UOJ Logo

NOI.AC

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#193360#967. 01字符串wangyejun1231002ms1240kbC++269b2023-10-14 10:11:442023-10-14 10:11:48

answer

#include <bits/stdc++.h>
using namespace std;
int n;
string s="0";
string sss(string s){
	string p="";
	for(int i=0;i<s.size();i++){
		if(s[i]=='0') p+='1';
		else p+="01";
	}return p;
}int main(){
	cin>>n;
	while(n--){s=sss(s);}
	cout<<s;
	return 0;
}//

详细

小提示:点击横条可展开更详细的信息

Test #1:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

13

output:

1010110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '101011010110110101101011011010...0110101101101011010110110101101'

Test #2:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

12

output:

0110110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '011011010110110101101011011010...0110101101101011010110110101101'

Test #3:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

11

output:

1010110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '101011010110110101101011011010...0110101101101011010110110101101'

Test #4:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

10

output:

01101101011011010110101101101011011010110101101101011010110110101101101011010110110101101

result:

ok single line: '011011010110110101101011011010...0110101101101011010110110101101'

Test #5:

score: 5
Accepted
time: 0ms
memory: 1212kb

input:

09

output:

1010110101101101011010110110101101101011010110110101101

result:

ok single line: '1010110101101101011010110110101101101011010110110101101'

Test #6:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

14

output:

0110110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '011011010110110101101011011010...0110101101101011010110110101101'

Test #7:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

15

output:

1010110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '101011010110110101101011011010...0110101101101011010110110101101'

Test #8:

score: 5
Accepted
time: 0ms
memory: 1216kb

input:

16

output:

0110110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '011011010110110101101011011010...0110101101101011010110110101101'

Test #9:

score: 5
Accepted
time: 0ms
memory: 1224kb

input:

17

output:

1010110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '101011010110110101101011011010...0110101101101011010110110101101'

Test #10:

score: 5
Accepted
time: 1ms
memory: 1228kb

input:

18

output:

0110110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '011011010110110101101011011010...0110101101101011010110110101101'

Test #11:

score: 5
Accepted
time: 0ms
memory: 1240kb

input:

19

output:

1010110101101101011010110110101101101011010110110101101011011010110110101101011011010110110101101011...

result:

ok single line: '101011010110110101101011011010...0110101101101011010110110101101'

Test #12:

score: 5
Accepted
time: 0ms
memory: 1204kb

input:

00

output:

0

result:

ok single line: '0'

Test #13:

score: 5
Accepted
time: 0ms
memory: 1200kb

input:

01

output:

1

result:

ok single line: '1'

Test #14:

score: 5
Accepted
time: 0ms
memory: 1208kb

input:

02

output:

01

result:

ok single line: '01'

Test #15:

score: 5
Accepted
time: 0ms
memory: 1212kb

input:

03

output:

101

result:

ok single line: '101'

Test #16:

score: 5
Accepted
time: 0ms
memory: 1208kb

input:

04

output:

01101

result:

ok single line: '01101'

Test #17:

score: 5
Accepted
time: 0ms
memory: 1208kb

input:

05

output:

10101101

result:

ok single line: '10101101'

Test #18:

score: 5
Accepted
time: 0ms
memory: 1212kb

input:

06

output:

0110110101101

result:

ok single line: '0110110101101'

Test #19:

score: 5
Accepted
time: 0ms
memory: 1212kb

input:

07

output:

101011010110110101101

result:

ok single line: '101011010110110101101'

Test #20:

score: 5
Accepted
time: 1ms
memory: 1208kb

input:

08

output:

0110110101101101011010110110101101

result:

ok single line: '0110110101101101011010110110101101'