基础练习 01字串
来源:互联网 发布:js 对象 remove 编辑:程序博客网 时间:2024/06/05 17:44
对于长度为5位的一个01串,每一位都可能是0或1,一共有32种可能。它们的前几个是:
00000
00001
00010
00011
00100
请按从小到大的顺序输出这32种01串。
00001
00010
00011
<以下部分省略>
public class Main {
public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("00000");
System.out.println("00001");
System.out.println("00010");
System.out.println("00011");
System.out.println("00100");
System.out.println("00101");
System.out.println("00110");
System.out.println("00111");
System.out.println("01000");
System.out.println("01001");
System.out.println("01010");
System.out.println("01011");
System.out.println("01100");
System.out.println("01101");
System.out.println("01110");
System.out.println("01111");
System.out.println("10000");
System.out.println("10001");
System.out.println("10010");
System.out.println("10011");
System.out.println("10100");
System.out.println("10101");
System.out.println("10110");
System.out.println("10111");
System.out.println("11000");
System.out.println("11001");
System.out.println("11010");
System.out.println("11011");
System.out.println("11100");
System.out.println("11101");
System.out.println("11110");
System.out.println("11111");
}
}
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- 基础练习 01字串
- POJ 1703 Find them, Catch them 种类并查集
- 收藏了一些国内的android开发博客:
- SpingMVC常用注解
- 八大排序--归并排序
- 用JNI从C传递结构体到JAVA
- 基础练习 01字串
- 服务端程序考虑的一些问题
- C# volatile 理解
- Mac 开启WebServer 服务器
- bootstrap模态框 垂直居中
- 12E
- 小希的迷宫
- OC测试题
- 《C++ Primer Plus(第六版)》(4)(第四章 复合类型 答案1)