数学计算机王子 提交的代码
提交时间:2020年8月4日 10:29 语言:C++运行时间:0ms占用内存:253K
运行状态: Accepted
题目:01序列1001

大会员可查看代码,点此开通大会员

                
                    #include <iostream>

using namespace std;

int main()
{
	string s = "000000";
	while (s != "111111")
    {
        cout << s << endl;
        int index = 5;
        while (s[index] != '0')
        {
            s[index] = '0';
            index--;
        }
        s[index] = '1';
	}
	cout << s << endl;
}