你被我包围了
上代码
import java.math.BigInteger;
public class Main {
public static void main(String[] args) {
BigInteger bigInteger = new BigInteger("FFFFFFFFFFFFF", 16);
BigInteger[] mut = new BigInteger[]{
new BigInteger("0000000000000",16),
new BigInteger("007F80001FE00",16),
new BigInteger("01FFF807FFF80",16),
new BigInteger("07FFFF3FFFFE0",16),
new BigInteger("1FFFFFFFFFFF8",16),
new BigInteger("1FFFFFFFFFFF8",16),
new BigInteger("1FFFFFFFFFFF8",16),
new BigInteger("0FFFFFFFFFFF0",16),
new BigInteger("07FFFFFFFFFE0",16),
new BigInteger("03FFFFFFFFFC0",16),
new BigInteger("01FFFFFFFFF80",16),
new BigInteger("00FFFFFFFFF00",16),
new BigInteger("007FFFFFFFE00",16),
new BigInteger("003FFFFFFFC00",16),
new BigInteger("001FFFFFFF800",16),
new BigInteger("000FFFFFFF000",16),
new BigInteger("0007FFFFFE000",16),
new BigInteger("0003FFFFFC000",16),
new BigInteger("0001FFFFF8000",16),
new BigInteger("0000FFFFF0000",16),
new BigInteger("00007FFFE0000",16),
new BigInteger("00001FFF80000",16),
new BigInteger("000007FE00000",16),
new BigInteger("000001F800000",16),
new BigInteger("0000006000000",16)
} ;
for (BigInteger j : mut) {
print(bigInteger.subtract(j).toString(2));
}
}
static void print(String s){
StringBuilder builder = new StringBuilder(s);
while (builder.length()<52){
builder.insert(0,0);
}
builder.chars().forEach(o->{
if (o==49){
System.out.format("\33[%d;%dm%s",31,46,"我");
}else{
System.out.format("\33[%d;%dm%s",32,45,"你");
}
});
System.out.println();
}
}