shib與hib疫苗
Ⅰ Java程序設計:請高手解決,有追加分
唉~~,平常回答問題都要去對方空間看看 是不是 美女,不過今天心情好算你賺到了 = =!。下面是代碼,但是字元 太多會有溢出問題,Integer裝不下,也懶得 改了。
package com.gby.util;
public class Moniter {
/**
* 記錄監視者當前的位置
*/
private int current;
/**
* 記錄最大的位置信息
*/
private int maxLength;
public int getCurrent() {
return current;
}
public void setCurrent(int current) {
this.current = current;
}
public int getMaxLength() {
return maxLength;
}
public void setMaxLength(int maxLength) {
this.maxLength = maxLength;
}
}
package com.gby.test;
import java.util.List;
import com.gby.util.Moniter;
import com.gby.util.MoniterManager;
public class Sperater {
public static void main(String[] args)
{
String str = "bushibat";
MoniterManager manager = new MoniterManager();
for (int i = 1; i < str.length()-1; i++)
{
Moniter moniter = new Moniter();
moniter.setCurrent(1);
moniter.setMaxLength(str.length() - 1);
manager.clear();
manager.add(moniter);
for (int j = 0; j < i-1; j++)
{
Moniter tem = new Moniter();
tem.setCurrent(j+2);
tem.setMaxLength(str.length() - 1);
manager.add(tem);
}
int count = 1;
int s = i;
while(s > 0)
{
count = (count * (str.length()-s));
s--;
}
int t =i;
while(t > 0)
{
count = count / t;
t--;
}
for (int j = 0; j < count; j++)
{
List<Integer> arr = manager.toIntArray();
System.out.print(str.substring(0,arr.get(0)));
System.out.print("/");
for (int k = 0; k < arr.size()-1; k++)
{
System.out.print(str.substring(arr.get(k), arr.get(k+1)));
System.out.print("/");
}
System.out.print(str.substring(arr.get(arr.size() - 1)));
System.out.println();
manager.run();
}
}
}
}
package com.gby.util;
import java.util.ArrayList;
import java.util.List;
public class MoniterManager {
private List<Moniter> allMoniter = new ArrayList<Moniter>();
public List<Integer> run()
{
if (allMoniter.size() == 0 )
{
return new ArrayList<Integer>();
}
if (allMoniter.get(allMoniter.size()-1).getCurrent() >= allMoniter.get(allMoniter.size()-1).getMaxLength())
{
adjustLocation();
return toIntArray();
}
allMoniter.get(allMoniter.size()-1).setCurrent(allMoniter.get(allMoniter.size()-1).getCurrent() + 1);
return toIntArray();
}
public void adjustLocation()
{
for (int i = allMoniter.size()-1; i > 0; i--)
{
Moniter last =allMoniter.get(i);
Moniter pre = allMoniter.get(i-1);
Boolean justOK =false;
if (pre.getCurrent() + 2 <= last.getCurrent())
{
pre.setCurrent(pre.getCurrent() + 1);
for (int j = 0; j < allMoniter.size()-i; j++)
{
Moniter before = allMoniter.get(allMoniter.size() - j - 2);
Moniter after = allMoniter.get(allMoniter.size() - j - 1);
justOK = true;
after.setCurrent(before.getCurrent() + 1);
}
if (justOK)
{
break;
}
}
}
}
public List<Integer> toIntArray()
{
List<Integer> arr = new ArrayList<Integer>();
for (int i = 0; i < allMoniter.size(); i++)
{
arr.add(allMoniter.get(i).getCurrent());
}
return arr;
}
public void add(Moniter moniter)
{
allMoniter.add(moniter);
}
public void clear()
{
allMoniter.removeAll(allMoniter);
}
public String toString()
{
String str ="";
for (int i = 0; i < allMoniter.size(); i++)
{
str = str + allMoniter.get(i).getCurrent() + " ";
}
return str;
}
public Moniter getRunMoniter()
{
return allMoniter.get(allMoniter.size()-1);
}
}
運行結果:
b/ushibat
bu/shibat
bus/hibat
bush/ibat
bushi/bat
bushib/at
bushiba/t
b/u/shibat
b/us/hibat
b/ush/ibat
b/ushi/bat
b/ushib/at
b/ushiba/t
bu/s/hibat
bu/sh/ibat
bu/shi/bat
bu/shib/at
bu/shiba/t
bus/h/ibat
bus/hi/bat
bus/hib/at
bus/hiba/t
bush/i/bat
bush/ib/at
bush/iba/t
bushi/b/at
bushi/ba/t
bushib/a/t
b/u/s/hibat
b/u/sh/ibat
b/u/shi/bat
b/u/shib/at
b/u/shiba/t
b/us/h/ibat
b/us/hi/bat
b/us/hib/at
b/us/hiba/t
b/ush/i/bat
b/ush/ib/at
b/ush/iba/t
b/ushi/b/at
b/ushi/ba/t
b/ushib/a/t
bu/s/hiba/t
bu/sh/i/bat
bu/sh/ib/at
bu/sh/iba/t
bu/shi/b/at
bu/shi/ba/t
bu/shib/a/t
bus/h/iba/t
bus/hi/b/at
bus/hi/ba/t
bus/hib/a/t
bush/i/ba/t
bush/ib/a/t
bushi/b/a/t
bushi/b/a/t
bushi/b/a/t
bushi/b/a/t
bushi/b/a/t
bushi/b/a/t
bushi/b/a/t
b/u/s/h/ibat
b/u/s/hi/bat
b/u/s/hib/at
b/u/s/hiba/t
b/u/sh/i/bat
b/u/sh/ib/at
b/u/sh/iba/t
b/u/shi/b/at
b/u/shi/ba/t
b/u/shib/a/t
b/us/h/iba/t
b/us/hi/b/at
b/us/hi/ba/t
b/us/hib/a/t
b/ush/i/ba/t
b/ush/ib/a/t
b/ushi/b/a/t
bu/s/hib/a/t
bu/sh/i/ba/t
bu/sh/ib/a/t
bu/shi/b/a/t
bus/h/ib/a/t
bus/hi/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
bush/i/b/a/t
b/u/s/h/i/bat
b/u/s/h/ib/at
b/u/s/h/iba/t
b/u/s/hi/b/at
b/u/s/hi/ba/t
b/u/s/hib/a/t
b/u/sh/i/ba/t
b/u/sh/ib/a/t
b/u/shi/b/a/t
b/us/h/ib/a/t
b/us/hi/b/a/t
b/ush/i/b/a/t
bu/s/hi/b/a/t
bu/sh/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
bus/h/i/b/a/t
b/u/s/h/i/b/at
b/u/s/h/i/ba/t
b/u/s/h/ib/a/t
b/u/s/hi/b/a/t
b/u/sh/i/b/a/t
b/us/h/i/b/a/t
bu/s/h/i/b/a/t
Hello 運行結果如下:
H/ello
He/llo
Hel/lo
Hell/o
H/e/llo
H/el/lo
H/ell/o
He/l/lo
He/ll/o
Hel/l/o
H/e/l/lo
H/e/ll/o
H/el/l/o
He/l/l/o
Ⅱ KINGSHIB是什麼幣,總發行量是
摘要 ,據官方公告,11月1日21:00 LBank(LBank.site)上線KINGSHIB(KING SHIBA),開放USDT交易,10月31日18:00開放充值,11月2日18:00開放提現。官網顯示, King Shiba是運行在BSC上的一種去中心化的加密貨幣,可以通過Pancakeswap交換進行交易。King Shiba Token是作為模仿Shiba Inu / Dogecoin而創建的