62,623
社区成员
发帖
与我相关
我的任务
分享
try{
//读取输入
byte[] b = new byte[1024];
int num = System.in.read(b);
//把获得的输入去掉回车和换行,构造成字符串
String s = new String(b,0,num-2);
//转换成十进制
int n = Integer.parseInt(s,2);
}catch(Exception e){}
Integer.toBinaryString(7);// 反过来,10进制到二进制 Integer.parseInt("1111", 2);