QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#311047#5236. Wersja dla profesjonalistów [A]wullaaa4 1ms4016kbC++14573b2024-01-21 21:11:262024-01-21 21:11:26

Judging History

你现在查看的是最新测评结果

  • [2024-01-21 21:11:26]
  • 评测
  • 测评结果:4
  • 用时:1ms
  • 内存:4016kb
  • [2024-01-21 21:11:26]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
string power(int x,string a){
	if(x<=9){
		if(!x) return "";
		if(x==1) return a;
		return char('0'+x)+string("[")+a+"]";
	}
	return "9["+power(x/9,a)+"]"+power(x%9,a);
}
void solve(int n){
	if(n==1) return printf("AE"),void();
	if(n&1) return cout<<"2[",solve(n>>1),cout<<"]"<<power(n>>1,"AC")<<power(n>>1,"AC"+power(n>>1,"EC")+power(n>>1,"A"))<<"A"<<power(n,"E"),void();
	cout<<power(n,"A")<<power(n-1,"EC")<<"E",solve(n-1);
}
int main(){
	int n; scanf("%d",&n),solve(n),cout<<power(n,"C");
	
	return 0;
}

詳細信息

Subtask #1:

score: 1
Accepted

Test #1:

score: 1
Accepted
time: 1ms
memory: 3776kb

input:

1

output:

AEC

result:

ok correct (length = 3)

Test #2:

score: 0
Accepted
time: 1ms
memory: 3768kb

input:

2

output:

2[A]ECEAE2[C]

result:

ok correct (length = 13)

Test #3:

score: 0
Accepted
time: 0ms
memory: 3700kb

input:

4

output:

4[A]3[EC]E2[AE]ACACECAA3[E]4[C]

result:

ok correct (length = 30)

Test #4:

score: 0
Accepted
time: 1ms
memory: 3976kb

input:

5

output:

2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]5[C]

result:

ok correct (length = 43)

Test #5:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

6

output:

6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]6[C]

result:

ok correct (length = 53)

Test #6:

score: 0
Accepted
time: 0ms
memory: 3992kb

input:

7

output:

2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]7[C]

result:

ok correct (length = 53)

Test #7:

score: 0
Accepted
time: 0ms
memory: 3664kb

input:

10

output:

9[A]A9[EC]E2[4[A]3[EC]E2[AE]ACACECAA3[E]]4[AC]4[AC4[EC]4[A]]A9[E]9[C]C

result:

ok correct (length = 79)

Test #8:

score: 0
Accepted
time: 0ms
memory: 3936kb

input:

69

output:

2[9[3[A]]7[A]9[3[EC]]6[EC]E2[9[A]7[A]9[EC]6[EC]E2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]7[AC]9[AC9[EC]7[EC]9[A]7[A]]7[AC9[EC]7[EC]9[A]7[A]]A9[3[E]]6[E]]9[3[AC]]7[AC]9[3[AC9[3[EC]]7[EC]9[3[A]]7[A]]]7[AC9[3[EC]]7[EC]9[3[A]]7[A]]A9[7[E]]6[E]9[7[C]]6[C]

result:

ok correct (length = 277)

Test #9:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

100

output:

9[9[A]2[A]]A9[9[EC]2[EC]]E2[2[9[2[A]]6[A]9[2[EC]]5[EC]E2[2[2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]5[AC]5[AC5[EC]5[A]]A9[E]2[E]]9[AC]2[AC]9[AC9[EC]2[EC]9[A]2[A]]2[AC9[EC]2[EC]9[A]2[A]]A9[2[E]]5[E]]9[2[AC]]6[AC]9[2[AC9[2[EC]]6[EC]9[2[A]]6[A]]]6[AC9[2[EC]]6[EC]9[2[A]]6[A]]A9[5[E]]4[E]]9[5[AC]]4[AC]9[5[AC...

result:

ok correct (length = 312)

Test #10:

score: 0
Accepted
time: 1ms
memory: 3708kb

input:

101

output:

2[9[5[A]]5[A]9[5[EC]]4[EC]E2[9[2[A]]6[A]9[2[EC]]5[EC]E2[2[2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]5[AC]5[AC5[EC]5[A]]A9[E]2[E]]9[AC]2[AC]9[AC9[EC]2[EC]9[A]2[A]]2[AC9[EC]2[EC]9[A]2[A]]A9[2[E]]5[E]]9[2[AC]]6[AC]9[2[AC9[2[EC]]6[EC]9[2[A]]6[A]]]6[AC9[2[EC]]6[EC]9[2[A]]6[A]]A9[5[E]]4[E]]9[5[AC]]5[AC]9[5[AC9...

result:

ok correct (length = 321)

Test #11:

score: 0
Accepted
time: 0ms
memory: 3768kb

input:

250

output:

9[9[3[A]]]7[A]9[9[3[EC]]]6[EC]E2[9[9[A]4[A]]7[A]9[9[EC]4[EC]]6[EC]E2[2[9[3[A]]3[A]9[3[EC]]2[EC]E2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]6[AC]6[AC6[EC]6[A]]A9[E]4[E]]9[AC]5[AC]9[AC9[EC]5[EC]9[A]5[A]]5[AC9[EC]5[EC]9[A]5[A]]A9[3[E]]2[E]]9[3[AC]]3[AC]9[3[AC9[3[EC]]3[EC]9[3[...

result:

ok correct (length = 526)

Test #12:

score: 0
Accepted
time: 0ms
memory: 4008kb

input:

251

output:

2[2[9[6[A]]8[A]9[6[EC]]7[EC]E2[9[3[A]]3[A]9[3[EC]]2[EC]E2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]6[AC]6[AC6[EC]6[A]]A9[E]4[E]]9[AC]5[AC]9[AC9[EC]5[EC]9[A]5[A]]5[AC9[EC]5[EC]9[A]5[A]]A9[3[E]]2[E]]9[3[AC]]3[AC]9[3[AC9[3[EC]]3[EC]9[3[A]]3[A]]]3[AC9[3[EC]]3[EC]9[3[A]]3[A]]A9...

result:

ok correct (length = 456)

Test #13:

score: 0
Accepted
time: 1ms
memory: 3784kb

input:

252

output:

9[9[3[A]]A]9[9[3[EC]]]8[EC]E2[2[9[6[A]]8[A]9[6[EC]]7[EC]E2[9[3[A]]3[A]9[3[EC]]2[EC]E2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]6[AC]6[AC6[EC]6[A]]A9[E]4[E]]9[AC]5[AC]9[AC9[EC]5[EC]9[A]5[A]]5[AC9[EC]5[EC]9[A]5[A]]A9[3[E]]2[E]]9[3[AC]]3[AC]9[3[AC9[3[EC]]3[EC]9[3[A]]3[A]]]3[A...

result:

ok correct (length = 479)

Test #14:

score: 0
Accepted
time: 1ms
memory: 3976kb

input:

299

output:

2[2[9[8[A]]2[A]9[8[EC]]ECE2[9[4[A]]9[3[EC]]8[EC]E2[2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]]9[AC]8[AC]9[AC9[EC]8[EC]9[A]8[A]]8[AC9[EC]8[EC]9[A]8[A]]A9[3[E]]8[E]]9[4[AC]]9[4[AC9[4[EC]]9[4[A]]]]A9[8[E]]E]9[8[AC]]2[AC]9[8[AC9[8[EC]]2[EC]9[8[A]]2[A]]]2[AC9[8[...

result:

ok correct (length = 486)

Test #15:

score: 0
Accepted
time: 0ms
memory: 3668kb

input:

300

output:

9[9[3[A]]6[A]]3[A]9[9[3[EC]]6[EC]]2[EC]E2[2[9[8[A]]2[A]9[8[EC]]ECE2[9[4[A]]9[3[EC]]8[EC]E2[2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]]9[AC]8[AC]9[AC9[EC]8[EC]9[A]8[A]]8[AC9[EC]8[EC]9[A]8[A]]A9[3[E]]8[E]]9[4[AC]]9[4[AC9[4[EC]]9[4[A]]]]A9[8[E]]E]9[8[AC]]2[AC]...

result:

ok correct (length = 515)

Subtask #2:

score: 1
Accepted

Test #16:

score: 1
Accepted
time: 0ms
memory: 3788kb

input:

320

output:

9[9[3[A]]8[A]]5[A]9[9[3[EC]]8[EC]]4[EC]E2[2[2[2[2[2[4[A]3[EC]E2[AE]ACACECAA3[E]]4[AC]4[AC4[EC]4[A]]A9[E]]9[AC]9[AC9[EC]9[A]]A9[2[E]]E]9[2[AC]]AC9[2[AC9[2[EC]]EC9[2[A]]A]]AC9[2[EC]]EC9[2[A]]AA9[4[E]]3[E]]9[4[AC]]3[AC]9[4[AC9[4[EC]]3[EC]9[4[A]]3[A]]]3[AC9[4[EC]]3[EC]9[4[A]]3[A]]A9[8[E]]7[E]]9[8[AC]]7[...

result:

ok correct (length = 555)

Test #17:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

321

output:

2[9[9[A]8[A]]7[A]9[9[EC]8[EC]]6[EC]E2[2[2[2[2[4[A]3[EC]E2[AE]ACACECAA3[E]]4[AC]4[AC4[EC]4[A]]A9[E]]9[AC]9[AC9[EC]9[A]]A9[2[E]]E]9[2[AC]]AC9[2[AC9[2[EC]]EC9[2[A]]A]]AC9[2[EC]]EC9[2[A]]AA9[4[E]]3[E]]9[4[AC]]3[AC]9[4[AC9[4[EC]]3[EC]9[4[A]]3[A]]]3[AC9[4[EC]]3[EC]9[4[A]]3[A]]A9[8[E]]7[E]]9[8[AC]]7[AC]9[8...

result:

ok correct (length = 507)

Test #18:

score: 0
Accepted
time: 0ms
memory: 3780kb

input:

1000

output:

9[9[9[A]3[A]]3[A]]A9[9[9[EC]3[EC]]3[EC]]E2[2[2[9[9[A]4[A]]7[A]9[9[EC]4[EC]]6[EC]E2[2[9[3[A]]3[A]9[3[EC]]2[EC]E2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]6[AC]6[AC6[EC]6[A]]A9[E]4[E]]9[AC]5[AC]9[AC9[EC]5[EC]9[A]5[A]]5[AC9[EC]5[EC]9[A]5[A]]A9[3[E]]2[E]]9[3[AC]]3[AC]9[3[AC9[3...

result:

ok correct (length = 809)

Test #19:

score: 0
Accepted
time: 0ms
memory: 3728kb

input:

1024

output:

9[9[9[A]3[A]]5[A]]7[A]9[9[9[EC]3[EC]]5[EC]]6[EC]E2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC9[3[EC]]4[EC]9[3[A]]4[A]]A9[7[E]]]9[7[AC]]9[7...

result:

ok correct (length = 663)

Test #20:

score: 0
Accepted
time: 1ms
memory: 3716kb

input:

1235

output:

2[2[9[9[3[A]]7[A]]2[A]9[9[3[EC]]7[EC]]ECE2[2[9[8[A]]4[A]9[8[EC]]3[EC]E2[2[9[2[A]]9[EC]8[EC]E2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]]9[2[AC]]9[2[AC9[2[EC]]9[2[A]]]]A9[4[E]]E]9[4[AC]]AC9[4[AC9[4[EC]]EC9[4[A]]A]]AC9[4[EC]]EC9[4[A]]AA9[8[E]]3[E]]9[8[AC]]4[AC...

result:

ok correct (length = 934)

Test #21:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

4094

output:

9[9[9[5[A]]5[A]]4[A]]8[A]9[9[9[5[EC]]5[EC]]4[EC]]7[EC]E2[9[9[9[2[A]]7[A]]2[A]]3[A]9[9[9[2[EC]]7[EC]]2[EC]]2[EC]E2[9[9[9[A]3[A]]5[A]]5[A]9[9[9[EC]3[EC]]5[EC]]4[EC]E2[9[9[6[A]]2[A]]6[A]9[9[6[EC]]2[EC]]5[EC]E2[9[9[3[A]]A]2[A]9[9[3[EC]]EC]ECE2[9[9[A]5[A]]9[9[EC]4[EC]]8[EC]E2[9[6[A]]8[A]9[6[EC]]7[EC]E2[9...

result:

ok correct (length = 1296)

Test #22:

score: 0
Accepted
time: 0ms
memory: 3784kb

input:

4095

output:

2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC9[3[EC]]4[EC]9[3[A]]4[A]]A9[7[E]]]9[7[AC]]9[7[AC9[7[EC]]9[7[A]]]]A9[9[E]5[E]]E]9[9[AC]5[AC...

result:

ok correct (length = 1027)

Test #23:

score: 0
Accepted
time: 0ms
memory: 3980kb

input:

4096

output:

9[9[9[5[A]]5[A]]5[A]]A9[9[9[5[EC]]5[EC]]5[EC]]E2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC9[3[EC]]4[EC]9[3[A]]4[A]]A9[7[E]]]9[7[AC]]9...

result:

ok correct (length = 1056)

Test #24:

score: 0
Accepted
time: 0ms
memory: 3716kb

input:

4097

output:

2[9[9[9[2[A]]7[A]]2[A]]5[A]9[9[9[2[EC]]7[EC]]2[EC]]4[EC]E2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC9[3[EC]]4[EC]9[3[A]]4[A]]A9[7[E]]]9...

result:

ok correct (length = 933)

Test #25:

score: 0
Accepted
time: 0ms
memory: 3772kb

input:

4998

output:

9[9[9[6[A]]7[A]]6[A]]3[A]9[9[9[6[EC]]7[EC]]6[EC]]2[EC]E2[9[9[9[3[A]]3[A]]7[A]]5[A]9[9[9[3[EC]]3[EC]]7[EC]]4[EC]E2[9[9[9[A]6[A]]3[A]]6[A]9[9[9[EC]6[EC]]3[EC]]5[EC]E2[2[2[2[2[9[4[A]]2[A]9[4[EC]]ECE2[9[2[A]]9[EC]8[EC]E2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]...

result:

ok correct (length = 1662)

Test #26:

score: 0
Accepted
time: 0ms
memory: 3724kb

input:

4999

output:

2[2[2[9[9[7[A]]6[A]]3[A]9[9[7[EC]]6[EC]]2[EC]E2[2[2[2[9[4[A]]2[A]9[4[EC]]ECE2[9[2[A]]9[EC]8[EC]E2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]]9[2[AC]]9[2[AC9[2[EC]]9[2[A]]]]A9[4[E]]E]9[4[AC]]2[AC]9[4[AC9[4[EC]]2[EC]9[4[A]]2[A]]]2[AC9[4[EC]]2[EC]9[4[A]]2[A]]A9[...

result:

ok correct (length = 1391)

Test #27:

score: 0
Accepted
time: 0ms
memory: 4000kb

input:

5000

output:

9[9[9[6[A]]7[A]]6[A]]5[A]9[9[9[6[EC]]7[EC]]6[EC]]4[EC]E2[2[2[9[9[7[A]]6[A]]3[A]9[9[7[EC]]6[EC]]2[EC]E2[2[2[2[9[4[A]]2[A]9[4[EC]]ECE2[9[2[A]]9[EC]8[EC]E2[8[A]7[EC]E2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]8[AC]8[AC8[EC]8[A]]A9[E]8[E]]9[2[AC]]9[2[AC9[2[EC]]9[2[A]]]]A9[4[E]]E]9[4[AC]]2[AC]9[4[AC9[4...

result:

ok correct (length = 1427)

Subtask #3:

score: 1
Accepted

Test #28:

score: 1
Accepted
time: 0ms
memory: 3744kb

input:

1000000

output:

9[9[9[9[9[9[A]7[A]]8[A]]3[A]]6[A]]6[A]]A9[9[9[9[9[9[EC]7[EC]]8[EC]]3[EC]]6[EC]]6[EC]]E2[2[2[2[2[2[9[9[9[9[2[A]]3[A]]3[A]]8[A]]9[9[9[9[2[EC]]3[EC]]3[EC]]7[EC]]8[EC]E2[2[2[9[9[9[2[A]]6[A]]]8[A]9[9[9[2[EC]]6[EC]]]7[EC]E2[2[2[2[2[9[6[A]]6[A]9[6[EC]]5[EC]E2[2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[...

result:

ok correct (length = 3639)

Test #29:

score: 0
Accepted
time: 1ms
memory: 3804kb

input:

999998

output:

9[9[9[9[9[9[A]7[A]]8[A]]3[A]]6[A]]5[A]]8[A]9[9[9[9[9[9[EC]7[EC]]8[EC]]3[EC]]6[EC]]5[EC]]7[EC]E2[9[9[9[9[9[8[A]]4[A]]A]7[A]]7[A]]3[A]9[9[9[9[9[8[EC]]4[EC]]EC]7[EC]]7[EC]]2[EC]E2[9[9[9[9[9[4[A]]2[A]]]8[A]]3[A]]5[A]9[9[9[9[9[4[EC]]2[EC]]]8[EC]]3[EC]]4[EC]E2[9[9[9[9[9[2[A]]A]]4[A]]A]6[A]9[9[9[9[9[2[EC]]...

result:

ok correct (length = 3998)

Test #30:

score: 0
Accepted
time: 0ms
memory: 3776kb

input:

524286

output:

9[9[9[9[9[8[A]]7[A]]8[A]]A]6[A]]9[9[9[9[9[8[EC]]7[EC]]8[EC]]EC]5[EC]]8[EC]E2[9[9[9[9[9[4[A]]3[A]]8[A]]5[A]]2[A]]8[A]9[9[9[9[9[4[EC]]3[EC]]8[EC]]5[EC]]2[EC]]7[EC]E2[9[9[9[9[9[2[A]]A]8[A]]7[A]]A]3[A]9[9[9[9[9[2[EC]]EC]8[EC]]7[EC]]EC]2[EC]E2[9[9[9[9[9[A]]8[A]]8[A]]]5[A]9[9[9[9[9[EC]]8[EC]]8[EC]]]4[EC]E...

result:

ok correct (length = 4435)

Test #31:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

524288

output:

9[9[9[9[9[8[A]]7[A]]8[A]]A]6[A]]2[A]9[9[9[9[9[8[EC]]7[EC]]8[EC]]EC]6[EC]]ECE2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC...

result:

ok correct (length = 3385)

Test #32:

score: 0
Accepted
time: 0ms
memory: 3800kb

input:

524290

output:

9[9[9[9[9[8[A]]7[A]]8[A]]A]6[A]]4[A]9[9[9[9[9[8[EC]]7[EC]]8[EC]]EC]6[EC]]3[EC]E2[9[9[9[9[9[4[A]]3[A]]8[A]]5[A]]3[A]]A9[9[9[9[9[4[EC]]3[EC]]8[EC]]5[EC]]3[EC]]E2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9...

result:

ok correct (length = 3262)

Test #33:

score: 0
Accepted
time: 0ms
memory: 3692kb

input:

786429

output:

2[9[9[9[9[9[6[A]]5[A]]8[A]]3[A]]4[A]]4[A]9[9[9[9[9[6[EC]]5[EC]]8[EC]]3[EC]]4[EC]]3[EC]E2[9[9[9[9[9[3[A]]2[A]]8[A]]6[A]]2[A]]A9[9[9[9[9[3[EC]]2[EC]]8[EC]]6[EC]]2[EC]]E2[9[9[9[9[9[A]5[A]]8[A]]7[A]]5[A]]4[A]9[9[9[9[9[EC]5[EC]]8[EC]]7[EC]]5[EC]]3[EC]E2[9[9[9[9[7[A]]4[A]]3[A]]7[A]]A9[9[9[9[7[EC]]4[EC]]3[...

result:

ok correct (length = 4370)

Test #34:

score: 0
Accepted
time: 0ms
memory: 3992kb

input:

786431

output:

2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]5[AC]5[AC5[EC]5[A]]A9[E]2[E]]9[AC]2[AC]9[AC9[EC]2[EC]9[A]2[A]]2[AC9[EC]2[EC]9[A]2[A]]A9[2[E]]5[E]]9[2[AC]]5[AC]9[2[AC9[2[EC]]5[EC]9[2[A]]5[A]]]5[AC9[2[EC]]5[EC]9[2[A]]5[A]]A9[5[E]]2[E]]9[5[AC]]2[AC]9[5[AC9[5[EC]]2[EC]9[5[A]]2[A]]...

result:

ok correct (length = 3562)

Test #35:

score: 0
Accepted
time: 1ms
memory: 3992kb

input:

951557

output:

2[9[9[9[9[9[8[A]]]4[A]]5[A]]7[A]]2[A]9[9[9[9[9[8[EC]]]4[EC]]5[EC]]7[EC]]ECE2[9[9[9[9[9[4[A]]]2[A]]2[A]]8[A]]9[9[9[9[9[4[EC]]]2[EC]]2[EC]]7[EC]]8[EC]E2[2[2[2[2[2[9[9[9[5[A]]]7[A]]8[A]9[9[9[5[EC]]]7[EC]]7[EC]E2[2[9[9[9[A]2[A]]4[A]]A9[9[9[EC]2[EC]]4[EC]]E2[2[2[2[2[9[3[A]]A9[3[EC]]E2[2[6[A]5[EC]E2[2[A]E...

result:

ok correct (length = 4718)

Test #36:

score: 0
Accepted
time: 1ms
memory: 3800kb

input:

838702

output:

9[9[9[9[9[9[A]5[A]]A]7[A]]4[A]]3[A]]A9[9[9[9[9[9[EC]5[EC]]EC]7[EC]]4[EC]]3[EC]]E2[9[9[9[9[9[7[A]]]8[A]]2[A]]A]4[A]9[9[9[9[9[7[EC]]]8[EC]]2[EC]]EC]3[EC]E2[9[9[9[9[9[3[A]]4[A]]8[A]]5[A]]5[A]]A9[9[9[9[9[3[EC]]4[EC]]8[EC]]5[EC]]5[EC]]E2[9[9[9[9[9[A]6[A]]8[A]]7[A]]2[A]]4[A]9[9[9[9[9[EC]6[EC]]8[EC]]7[EC]]...

result:

ok correct (length = 4235)

Subtask #4:

score: 1
Accepted

Test #37:

score: 1
Accepted
time: 1ms
memory: 3772kb

input:

999999

output:

2[2[2[2[2[2[9[9[9[9[2[A]]3[A]]3[A]]8[A]]9[9[9[9[2[EC]]3[EC]]3[EC]]7[EC]]8[EC]E2[2[2[9[9[9[2[A]]6[A]]]8[A]9[9[9[2[EC]]6[EC]]]7[EC]E2[2[2[2[2[9[6[A]]6[A]9[6[EC]]5[EC]E2[2[9[A]5[A]9[EC]4[EC]E2[6[A]5[EC]E2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]6[AC]6[AC6[EC]6[A]]A9[E]4[E]]9[AC]5[AC]9[AC9[EC]5[EC]9[A]5[A]]5...

result:

ok correct (length = 3585)

Test #38:

score: 0
Accepted
time: 0ms
memory: 3736kb

input:

999997

output:

2[9[9[9[9[9[8[A]]4[A]]A]7[A]]7[A]]3[A]9[9[9[9[9[8[EC]]4[EC]]EC]7[EC]]7[EC]]2[EC]E2[9[9[9[9[9[4[A]]2[A]]]8[A]]3[A]]5[A]9[9[9[9[9[4[EC]]2[EC]]]8[EC]]3[EC]]4[EC]E2[9[9[9[9[9[2[A]]A]]4[A]]A]6[A]9[9[9[9[9[2[EC]]EC]]4[EC]]EC]5[EC]E2[9[9[9[9[9[A]]4[A]]6[A]]5[A]]2[A]9[9[9[9[9[EC]]4[EC]]6[EC]]5[EC]]ECE2[9[9[...

result:

ok correct (length = 3895)

Test #39:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

524287

output:

2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[AC9[3[EC]]4[EC]9[3[A]]4[A]]A9[7[E]]]9[7[AC]]9[7[AC9[7[EC]]9[7[A]]]]A9[9[E]5[E]...

result:

ok correct (length = 3337)

Test #40:

score: 0
Accepted
time: 0ms
memory: 3688kb

input:

524289

output:

2[9[9[9[9[9[4[A]]3[A]]8[A]]5[A]]3[A]]A9[9[9[9[9[4[EC]]3[EC]]8[EC]]5[EC]]3[EC]]E2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]ACACECAA3[E]]3[AC]3[AC3[EC]3[A]]A7[E]]7[AC]7[AC7[EC]7[A]]A9[E]6[E]]9[AC]6[AC]9[AC9[EC]6[EC]9[A]6[A]]6[AC9[EC]6[EC]9[A]6[A]]A9[3[E]]4[E]]9[3[AC]]4[AC]9[3[AC9[3[EC]]4[EC]9[3[A]]4[A]]]4[A...

result:

ok correct (length = 3207)

Test #41:

score: 0
Accepted
time: 0ms
memory: 3732kb

input:

786428

output:

9[9[9[9[9[9[A]4[A]]2[A]]7[A]]6[A]]8[A]]8[A]9[9[9[9[9[9[EC]4[EC]]2[EC]]7[EC]]6[EC]]8[EC]]7[EC]E2[2[9[9[9[9[9[3[A]]2[A]]8[A]]6[A]]2[A]]A9[9[9[9[9[3[EC]]2[EC]]8[EC]]6[EC]]2[EC]]E2[9[9[9[9[9[A]5[A]]8[A]]7[A]]5[A]]4[A]9[9[9[9[9[EC]5[EC]]8[EC]]7[EC]]5[EC]]3[EC]E2[9[9[9[9[7[A]]4[A]]3[A]]7[A]]A9[9[9[9[7[EC]...

result:

ok correct (length = 4475)

Test #42:

score: 0
Accepted
time: 0ms
memory: 3964kb

input:

786430

output:

9[9[9[9[9[9[A]4[A]]2[A]]7[A]]7[A]]]A9[9[9[9[9[9[EC]4[EC]]2[EC]]7[EC]]7[EC]]]E2[9[9[9[9[9[6[A]]5[A]]8[A]]3[A]]4[A]]4[A]9[9[9[9[9[6[EC]]5[EC]]8[EC]]3[EC]]4[EC]]3[EC]E2[9[9[9[9[9[3[A]]2[A]]8[A]]6[A]]2[A]]A9[9[9[9[9[3[EC]]2[EC]]8[EC]]6[EC]]2[EC]]E2[9[9[9[9[9[A]5[A]]8[A]]7[A]]5[A]]4[A]9[9[9[9[9[EC]5[EC]]...

result:

ok correct (length = 4450)

Test #43:

score: 0
Accepted
time: 0ms
memory: 3796kb

input:

786432

output:

9[9[9[9[9[9[A]4[A]]2[A]]7[A]]7[A]]]3[A]9[9[9[9[9[9[EC]4[EC]]2[EC]]7[EC]]7[EC]]]2[EC]E2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[A]ECEAE]2[AC]2[AC2[EC]2[A]]A5[E]]5[AC]5[AC5[EC]5[A]]A9[E]2[E]]9[AC]2[AC]9[AC9[EC]2[EC]9[A]2[A]]2[AC9[EC]2[EC]9[A]2[A]]A9[2[E]]5[E]]9[2[AC]]5[AC]9[2[AC9[2[EC]]5[EC]9[2[A]]5[A]]]5...

result:

ok correct (length = 3610)

Test #44:

score: 0
Accepted
time: 1ms
memory: 3988kb

input:

724171

output:

2[2[9[9[9[9[9[3[A]]]5[A]]3[A]]]7[A]9[9[9[9[9[3[EC]]]5[EC]]3[EC]]]6[EC]E2[9[9[9[9[9[A]4[A]]7[A]]A]4[A]]7[A]9[9[9[9[9[EC]4[EC]]7[EC]]EC]4[EC]]6[EC]E2[2[2[9[9[9[9[A]6[A]]4[A]]6[A]]A9[9[9[9[EC]6[EC]]4[EC]]6[EC]]E2[9[9[9[7[A]]6[A]]7[A]]4[A]9[9[9[7[EC]]6[EC]]7[EC]]3[EC]E2[2[2[9[9[8[A]]6[A]]4[A]9[9[8[EC]]6...

result:

ok correct (length = 3973)

Test #45:

score: 0
Accepted
time: 1ms
memory: 3732kb

input:

868406

output:

9[9[9[9[9[9[A]5[A]]6[A]]3[A]]2[A]]]5[A]9[9[9[9[9[9[EC]5[EC]]6[EC]]3[EC]]2[EC]]]4[EC]E2[9[9[9[9[9[7[A]]3[A]]A]5[A]]4[A]]6[A]9[9[9[9[9[7[EC]]3[EC]]EC]5[EC]]4[EC]]5[EC]E2[9[9[9[9[9[3[A]]6[A]]]7[A]]2[A]]2[A]9[9[9[9[9[3[EC]]6[EC]]]7[EC]]2[EC]]ECE2[2[9[9[9[9[8[A]]2[A]]4[A]]]4[A]9[9[9[9[8[EC]]2[EC]]4[EC]]]...

result:

ok correct (length = 3980)

Subtask #5:

score: 0
Wrong Answer

Test #46:

score: 0
Wrong Answer
time: 1ms
memory: 4016kb

input:

10000000000

output:

9[9[9[9[9[9[9[9[9[3[A]]5[A]]6[A]]7[A]]2[A]]5[A]]2[A]]]8[A]]2[A]9[9[9[9[9[9[9[9[9[3[EC]]5[EC]]6[EC]]7[EC]]2[EC]]5[EC]]2[EC]]]8[EC]]ECE2[2[2[2[2[2[2[2[2[2[9[9[9[9[9[9[2[A]]5[A]]2[A]]7[A]]8[A]]A]7[A]9[9[9[9[9[9[2[EC]]5[EC]]2[EC]]7[EC]]8[EC]]EC]6[EC]E2[2[2[9[9[9[9[9[2[A]]8[A]]2[A]]A]]A9[9[9[9[9[2[EC]]8[...

result:

wrong answer incorrect path

Subtask #6:

score: 0
Wrong Answer

Test #55:

score: 0
Wrong Answer
time: 1ms
memory: 3808kb

input:

9999999999

output:

2[2[2[2[2[2[2[2[2[2[9[9[9[9[9[9[2[A]]5[A]]2[A]]7[A]]8[A]]A]7[A]9[9[9[9[9[9[2[EC]]5[EC]]2[EC]]7[EC]]8[EC]]EC]6[EC]E2[2[2[9[9[9[9[9[2[A]]8[A]]2[A]]A]]A9[9[9[9[9[2[EC]]8[EC]]2[EC]]EC]]E2[9[9[9[9[9[A]4[A]]A]]4[A]]4[A]9[9[9[9[9[EC]4[EC]]EC]]4[EC]]3[EC]E2[9[9[9[9[6[A]]5[A]]]2[A]]A9[9[9[9[6[EC]]5[EC]]]2[EC...

result:

wrong answer incorrect path

Subtask #7:

score: 0
Wrong Answer

Test #64:

score: 0
Wrong Answer
time: 1ms
memory: 3816kb

input:

100000000000000

output:

9[9[9[9[9[9[9[9[6[A]]3[A]]7[A]]A]5[A]]8[A]]2[A]]7[A]]A9[9[9[9[9[9[9[9[6[EC]]3[EC]]7[EC]]EC]5[EC]]8[EC]]2[EC]]7[EC]]E2[2[2[2[2[2[2[2[2[2[2[2[2[2[9[9[9[9[2[A]]5[A]]A]2[A]]6[A]9[9[9[9[2[EC]]5[EC]]EC]2[EC]]5[EC]E2[2[2[9[9[9[2[A]]8[A]]]2[A]9[9[9[2[EC]]8[EC]]]ECE2[2[9[9[6[A]]4[A]]4[A]9[9[6[EC]]4[EC]]3[EC]...

result:

wrong answer incorrect path

Subtask #8:

score: 0
Wrong Answer

Test #84:

score: 0
Wrong Answer
time: 1ms
memory: 4004kb

input:

99999999999999

output:

2[2[2[2[2[2[2[2[2[2[2[2[2[2[9[9[9[9[2[A]]5[A]]A]2[A]]6[A]9[9[9[9[2[EC]]5[EC]]EC]2[EC]]5[EC]E2[2[2[9[9[9[2[A]]8[A]]]2[A]9[9[9[2[EC]]8[EC]]]ECE2[2[9[9[6[A]]4[A]]4[A]9[9[6[EC]]4[EC]]3[EC]E2[9[9[3[A]]2[A]]A9[9[3[EC]]2[EC]]E2[9[9[A]5[A]]4[A]9[9[EC]5[EC]]3[EC]E2[9[7[A]]A9[7[EC]]E2[2[2[2[2[AE]ACACECAA3[E]]...

result:

wrong answer incorrect path

Subtask #9:

score: 0
Memory Limit Exceeded

Test #103:

score: 0
Memory Limit Exceeded

input:

1000000000000000000

output:

0[A]/[EC]E2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[\x08[A]\x07[EC]E2[2[2[j[A]i[EC]E2[

result:


Subtask #10:

score: 0
Memory Limit Exceeded

Test #128:

score: 0
Memory Limit Exceeded

input:

999999999999999999

output:

2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[\x08[A]\x07[EC]E2[2[2[j[A]i[EC]E2[

result: