QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#310991 | #5236. Wersja dla profesjonalistów [A] | lhzawa | 4 | 1ms | 3976kb | C++14 | 766b | 2024-01-21 20:39:04 | 2024-01-21 20:39:05 |
answer
#include<bits/stdc++.h>
std::string copy(std::string s, int c) {
if (c == 0) return std::string();
if (c < 10) return std::to_string(c) + "[" + s + "]";
return copy(s, c % 9) + "9[" + copy(s, c / 9) + "]";
}
std::string solve(int n) {
if (n == 1) return "AE";
if (n == 2) return "AEACAEE";
if (n & 1) {
std::string s = "2[" + solve(n / 2) + "]"
+ copy("AC", n / 2)
+ copy("CA", n / 2 - 1) + "C"
+ copy(copy("E", n / 2) + copy("CA", n / 2 - 1) + "C", n / 2 - 1)
+ copy("A", n / 2 + 1) + copy("ECEA", n / 2)
+ copy("E", n / 2 + 1);
return s;
}
std::string s = solve(n - 1)
+ copy("AC", n - 1) + "A" + copy("E", n);
return s;
}
int main() {
int n; scanf("%d", &n);
std::cout << solve(n) + copy("C", n);
return 0;
}
详细
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 0ms
memory: 3652kb
input:
1
output:
AE1[C]
result:
ok correct (length = 3)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3660kb
input:
2
output:
AEACAEE2[C]
result:
ok correct (length = 13)
Test #3:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
4
output:
2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]4[C]
result:
ok correct (length = 30)
Test #4:
score: 0
Accepted
time: 0ms
memory: 3640kb
input:
5
output:
2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[C]
result:
ok correct (length = 43)
Test #5:
score: 0
Accepted
time: 0ms
memory: 3696kb
input:
6
output:
2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]6[C]
result:
ok correct (length = 53)
Test #6:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
7
output:
2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[C]
result:
ok correct (length = 53)
Test #7:
score: 0
Accepted
time: 1ms
memory: 3660kb
input:
10
output:
2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]9[AC]A1[E]9[1[E]]1[C]9[1[C]]
result:
ok correct (length = 79)
Test #8:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
69
output:
2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]6[AC]9[1[AC]]A7[E]9[1[E]]]7[AC]9[1[AC]]6[CA]9[1[CA]]C6[7[E]9[1[E]]6[CA]9[1[CA]]C]9[1[7[E]9[1[E]]6[CA]9[1[CA]]C]]8[A]9[1[A]]7[ECEA]9[1[ECEA]]8[E]9[1[E]]6[AC]9[3[AC]]A7[E]9[3[E]]]7[AC]9[3[...
result:
ok correct (length = 277)
Test #9:
score: 0
Accepted
time: 0ms
memory: 3668kb
input:
100
output:
2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]]2[AC]9[1[AC]]1[CA]9[1[CA]]C1[2[E]9[1[E]]1[CA]9[1[CA]]C]9[1[2[E]9[1[E]]1[CA]9[1[CA]]C]]3[A]9[1[A]]2[ECEA]9[1[ECEA]]3[E]9[1[E]]5[AC]9[2[AC]]A6[E]9[2[E]]]6[AC]9[2[AC]]5[CA]9[2[CA]]C5[6[E]9[2[E]]5[CA]9[2[CA...
result:
ok correct (length = 312)
Test #10:
score: 0
Accepted
time: 0ms
memory: 3920kb
input:
101
output:
2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]]2[AC]9[1[AC]]1[CA]9[1[CA]]C1[2[E]9[1[E]]1[CA]9[1[CA]]C]9[1[2[E]9[1[E]]1[CA]9[1[CA]]C]]3[A]9[1[A]]2[ECEA]9[1[ECEA]]3[E]9[1[E]]5[AC]9[2[AC]]A6[E]9[2[E]]]6[AC]9[2[AC]]5[CA]9[2[CA]]C5[6[E]9[2[E]]5[CA]9[2[CA...
result:
ok correct (length = 321)
Test #11:
score: 0
Accepted
time: 0ms
memory: 3716kb
input:
250
output:
2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]9[3[E]]]3[AC]9[3[AC]]2...
result:
ok correct (length = 526)
Test #12:
score: 0
Accepted
time: 0ms
memory: 3680kb
input:
251
output:
2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]9[3[E]]]3[AC]9[3[AC]]2...
result:
ok correct (length = 456)
Test #13:
score: 0
Accepted
time: 0ms
memory: 3920kb
input:
252
output:
2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]9[3[E]]]3[AC]9[3[AC]]2...
result:
ok correct (length = 479)
Test #14:
score: 0
Accepted
time: 0ms
memory: 3676kb
input:
299
output:
2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]]8[AC]9[1[AC]]7[CA]9[1[CA]]C7[8[E]9[1[E]]7[CA]9[1[CA]]C]9[1[8[E]9[1[E]]7[CA]9[1[CA]]C]]9[2[A]]8[ECEA]9[1[ECEA]]9[2[E]]8[AC]9[3[AC]]A9[4[E]]]9[4[AC]]8[CA]9[3[CA]]C8[9[4[E]]8...
result:
ok correct (length = 486)
Test #15:
score: 0
Accepted
time: 0ms
memory: 3920kb
input:
300
output:
2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]]8[AC]9[1[AC]]7[CA]9[1[CA]]C7[8[E]9[1[E]]7[CA]9[1[CA]]C]9[1[8[E]9[1[E]]7[CA]9[1[CA]]C]]9[2[A]]8[ECEA]9[1[ECEA]]9[2[E]]8[AC]9[3[AC]]A9[4[E]]]9[4[AC]]8[CA]9[3[CA]]C8[9[4[E]]8...
result:
ok correct (length = 515)
Subtask #2:
score: 1
Accepted
Test #16:
score: 1
Accepted
time: 0ms
memory: 3604kb
input:
320
output:
2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]]9[AC]8[CA]C8[9[E]8[CA]C]1[A]9[1[A]]9[ECEA]1[E]9[1[E]]]1[AC]9[2[AC]]9[2[CA]]C9[2[1[E]9[2[E]]9[2[CA]]C]]2[A]9[2[A]]1[ECEA]9[2[ECEA]]2[E]9[2[E]]]3[AC]9[4[AC]]2[CA]9[4[CA]]C2[3[E]9[4[E]]2[CA]9[4[CA]]C]9[4[3[E]9[4[E]...
result:
ok correct (length = 555)
Test #17:
score: 0
Accepted
time: 0ms
memory: 3656kb
input:
321
output:
2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]]9[AC]8[CA]C8[9[E]8[CA]C]1[A]9[1[A]]9[ECEA]1[E]9[1[E]]]1[AC]9[2[AC]]9[2[CA]]C9[2[1[E]9[2[E]]9[2[CA]]C]]2[A]9[2[A]]1[ECEA]9[2[ECEA]]2[E]9[2[E]]]3[AC]9[4[AC]]2[CA]9[4[CA]]C2[3[E]9[4[E]]2[CA]9[4[CA]]C]9[4[3[E]9[4[E]...
result:
ok correct (length = 507)
Test #18:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
1000
output:
2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]9[3[E]]]3[AC]9[3[A...
result:
ok correct (length = 809)
Test #19:
score: 0
Accepted
time: 1ms
memory: 3940kb
input:
1024
output:
2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]9[3[E]]3[CA]9[3[CA...
result:
ok correct (length = 663)
Test #20:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
1235
output:
2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]8[AC]9[1[AC]]A9[2[E]]]9[2[AC]]8[CA]9[1[CA]]C8[9[2[E]]8[CA]9[1[CA]]C]9[1[9[2[E]]8[CA]9[1[CA]]C]]1[A]9[2[A]]9[2[ECEA]]1[E]9[2[E]]]1[AC]9[4[AC]]9[4[CA]]C9[4[1[E]9[4[E]]9[4...
result:
ok correct (length = 934)
Test #21:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
4094
output:
2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]9[3[E]]]3[AC]9...
result:
ok correct (length = 1296)
Test #22:
score: 0
Accepted
time: 0ms
memory: 3936kb
input:
4095
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]9[3[E]]3[CA]9[...
result:
ok correct (length = 1027)
Test #23:
score: 0
Accepted
time: 0ms
memory: 3932kb
input:
4096
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]9[3[E]]3[CA]9[...
result:
ok correct (length = 1056)
Test #24:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
4097
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]9[3[E]]3[CA]9[...
result:
ok correct (length = 933)
Test #25:
score: 0
Accepted
time: 0ms
memory: 3664kb
input:
4998
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]8[AC]9[1[AC]]A9[2[E]]]9[2[AC]]8[CA]9[1[CA]]C8[9[2[E]]8[CA]9[1[CA]]C]9[1[9[2[E]]8[CA]9[1[CA]]C]]1[A]9[2[A]]9[2[ECEA]]1[E]9[2[E]]1[AC]9[4[AC]]A2[E]9[4[E]]]2[AC]9[4[AC...
result:
ok correct (length = 1662)
Test #26:
score: 0
Accepted
time: 0ms
memory: 3732kb
input:
4999
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]8[AC]9[1[AC]]A9[2[E]]]9[2[AC]]8[CA]9[1[CA]]C8[9[2[E]]8[CA]9[1[CA]]C]9[1[9[2[E]]8[CA]9[1[CA]]C]]1[A]9[2[A]]9[2[ECEA]]1[E]9[2[E]]1[AC]9[4[AC]]A2[E]9[4[E]]]2[AC]9[4[AC...
result:
ok correct (length = 1391)
Test #27:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
5000
output:
2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]7[AC]A8[E]]8[AC]7[CA]C7[8[E]7[CA]C]9[A]8[ECEA]9[E]8[AC]9[1[AC]]A9[2[E]]]9[2[AC]]8[CA]9[1[CA]]C8[9[2[E]]8[CA]9[1[CA]]C]9[1[9[2[E]]8[CA]9[1[CA]]C]]1[A]9[2[A]]9[2[ECEA]]1[E]9[2[E]]1[AC]9[4[AC]]A2[E]9[4[E]]]2[AC]9[4[AC...
result:
ok correct (length = 1427)
Subtask #3:
score: 1
Accepted
Test #28:
score: 1
Accepted
time: 0ms
memory: 3692kb
input:
1000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]]2[AC]9[3[AC]]1[...
result:
ok correct (length = 3639)
Test #29:
score: 0
Accepted
time: 0ms
memory: 3976kb
input:
999998
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]]2[AC]9[3[AC]]1[...
result:
ok correct (length = 3998)
Test #30:
score: 0
Accepted
time: 0ms
memory: 3764kb
input:
524286
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]2[AC]9[3[AC]]A3[E]...
result:
ok correct (length = 4435)
Test #31:
score: 0
Accepted
time: 0ms
memory: 3956kb
input:
524288
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]...
result:
ok correct (length = 3385)
Test #32:
score: 0
Accepted
time: 1ms
memory: 3956kb
input:
524290
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]...
result:
ok correct (length = 3262)
Test #33:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
786429
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]9[AC]A1[E]9[1[E]]]1[AC]9[1[AC]]9[CA]C9[1[E]9[1[E]]9[CA]C]2[A]9[1[A]]1[ECEA]9[1[ECEA]]2[E]9[1[E]]3[AC]9[2[AC]]A4[E]9[2[E]]]4[AC]9[2[AC]]3[CA]9[2[CA]]C3[4[E]9[2[E]]3[CA]9[2[CA]]C]9[2[4[E]9[2[E...
result:
ok correct (length = 4370)
Test #34:
score: 0
Accepted
time: 0ms
memory: 3736kb
input:
786431
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]]2[AC]9[1[AC]]1[CA]9[1[CA]]C1[2[E]9[1[E]]1[CA]9[1[CA]]C]9[1[2[E]9[1[E]]1[CA]9[1[CA]]C]]3[A]9[1[A]]2[ECEA]9[1[ECEA]]3[E]9[1[E]]]5[AC]9[2[AC]]4[CA]9[2[CA]]C4[5[E]9[2[E]]4[CA]9[2[C...
result:
ok correct (length = 3562)
Test #35:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
951557
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]]4[AC]9[1[AC]]3[CA]9[1[CA]]C3[4[E]9[1[E]]3[CA]9[1[CA]]C]9[1[4[E]9[1[E]]3[CA]9[1[CA]]C]]5[A]9[1[A]]4[ECEA]9[1[ECEA]]5[E]9[1[E]]9[3[AC]]A1[E]9[3[E]]]1[AC]9[3[AC]]9[3[CA]...
result:
ok correct (length = 4718)
Test #36:
score: 0
Accepted
time: 0ms
memory: 3704kb
input:
838702
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]]2[AC]9[1[AC]]1[CA]9[1[CA]]C1[2[E]9[1[E]]1[CA]9[1[CA]]C]9[1[2[E]9[1[E]]1[CA]9[1[CA]]C]]3[A]9[1[A]]2[ECEA]9[1[ECEA]]3[E]9[1[E]]5[AC]9[2[AC]]A6[E]9[2[E]]]6[AC]9[2[AC]]5[CA]9[2[CA]...
result:
ok correct (length = 4235)
Subtask #4:
score: 1
Accepted
Test #37:
score: 1
Accepted
time: 0ms
memory: 3964kb
input:
999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]]2[AC]9[3[AC]]1[...
result:
ok correct (length = 3585)
Test #38:
score: 0
Accepted
time: 0ms
memory: 3724kb
input:
999997
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]5[AC]A6[E]]6[AC]5[CA]C5[6[E]5[CA]C]7[A]6[ECEA]7[E]4[AC]9[1[AC]]A5[E]9[1[E]]]5[AC]9[1[AC]]4[CA]9[1[CA]]C4[5[E]9[1[E]]4[CA]9[1[CA]]C]9[1[5[E]9[1[E]]4[CA]9[1[CA]]C]]6[A]9[1[A]]5[ECEA]9[1[ECEA]]6[E]9[1[E]]]2[AC]9[3[AC]]1[...
result:
ok correct (length = 3895)
Test #39:
score: 0
Accepted
time: 1ms
memory: 3644kb
input:
524287
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]...
result:
ok correct (length = 3337)
Test #40:
score: 0
Accepted
time: 0ms
memory: 3684kb
input:
524289
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[CA]9[3[CA]]C3[4[E]...
result:
ok correct (length = 3207)
Test #41:
score: 0
Accepted
time: 0ms
memory: 3720kb
input:
786428
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]9[AC]A1[E]9[1[E]]]1[AC]9[1[AC]]9[CA]C9[1[E]9[1[E]]9[CA]C]2[A]9[1[A]]1[ECEA]9[1[ECEA]]2[E]9[1[E]]3[AC]9[2[AC]]A4[E]9[2[E]]]4[AC]9[2[AC]]3[CA]9[2[CA]]C3[4[E]9[2[E]]3[CA]9[2[CA]]C]9[2[4[E]9[2[E...
result:
ok correct (length = 4475)
Test #42:
score: 0
Accepted
time: 0ms
memory: 3712kb
input:
786430
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]9[AC]A1[E]9[1[E]]]1[AC]9[1[AC]]9[CA]C9[1[E]9[1[E]]9[CA]C]2[A]9[1[A]]1[ECEA]9[1[ECEA]]2[E]9[1[E]]3[AC]9[2[AC]]A4[E]9[2[E]]]4[AC]9[2[AC]]3[CA]9[2[CA]]C3[4[E]9[2[E]]3[CA]9[2[CA]]C]9[2[4[E]9[2[E...
result:
ok correct (length = 4450)
Test #43:
score: 0
Accepted
time: 0ms
memory: 3972kb
input:
786432
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]]2[AC]9[1[AC]]1[CA]9[1[CA]]C1[2[E]9[1[E]]1[CA]9[1[CA]]C]9[1[2[E]9[1[E]]1[CA]9[1[CA]]C]]3[A]9[1[A]]2[ECEA]9[1[ECEA]]3[E]9[1[E]]]5[AC]9[2[AC]]4[CA]9[2[CA]]C4[5[E]9[2[E]]4[CA]9[2[C...
result:
ok correct (length = 3610)
Test #44:
score: 0
Accepted
time: 1ms
memory: 3712kb
input:
724171
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]9[AC]A1[E]9[1[E]]]1[AC]9[1[AC]]9[CA]C9[1[E]9[1[E]]9[CA]C]2[A]9[1[A]]1[ECEA]9[1[ECEA]]2[E]9[1[E]]]3[AC]9[2[AC]]2[CA]9[2[CA]]C2[3[E]9[2[E]]2[CA]9[2[CA]]C]9[2[3[E]9[2[E]]2[CA]9[2[CA]]C]]4[A]9[2...
result:
ok correct (length = 3973)
Test #45:
score: 0
Accepted
time: 0ms
memory: 3648kb
input:
868406
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AEACAEE]2[AC]1[CA]C1[2[E]1[CA]C]3[A]2[ECEA]3[E]]5[AC]4[CA]C4[5[E]4[CA]C]6[A]5[ECEA]6[E]2[AC]9[1[AC]]A3[E]9[1[E]]]3[AC]9[1[AC]]2[CA]9[1[CA]]C2[3[E]9[1[E]]2[CA]9[1[CA]]C]9[1[3[E]9[1[E]]2[CA]9[1[CA]]C]]4[A]9[1[A]]3[ECEA]9[1[ECEA]]4[E]9[1[E]]]7[AC]9[2[AC]]6[CA]9[2[CA]...
result:
ok correct (length = 3980)
Subtask #5:
score: 0
Wrong Answer
Test #46:
score: 0
Wrong Answer
time: 1ms
memory: 3804kb
input:
10000000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]]9[AC]8[CA]C8[9[E]8[CA]C]1[A]9[1[A]]9[ECEA]1[E]9[1[E]]1[AC]9[2[AC]]A2[E]9[2[E]]]2[AC]9[2[AC]]1[CA]9[2[CA]]C1[2[E]9[2[E]]1[CA]9[2[CA]]C]9[2[2[E]9[2[E]]1[CA]9[2[CA]]C]]3[...
result:
wrong answer incorrect path
Subtask #6:
score: 0
Wrong Answer
Test #55:
score: 0
Wrong Answer
time: 1ms
memory: 3844kb
input:
9999999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]3[AC]A4[E]]4[AC]3[CA]C3[4[E]3[CA]C]5[A]4[ECEA]5[E]]9[AC]8[CA]C8[9[E]8[CA]C]1[A]9[1[A]]9[ECEA]1[E]9[1[E]]1[AC]9[2[AC]]A2[E]9[2[E]]]2[AC]9[2[AC]]1[CA]9[2[CA]]C1[2[E]9[2[E]]1[CA]9[2[CA]]C]9[2[2[E]9[2[E]]1[CA]9[2[CA]]C]]3[...
result:
wrong answer incorrect path
Subtask #7:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 1ms
memory: 3808kb
input:
100000000000000
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[...
result:
wrong answer incorrect path
Subtask #8:
score: 0
Wrong Answer
Test #84:
score: 0
Wrong Answer
time: 1ms
memory: 3736kb
input:
99999999999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]1[AC]C2[A]1[ECEA]2[E]]3[AC]2[CA]C2[3[E]2[CA]C]4[A]3[ECEA]4[E]]7[AC]6[CA]C6[7[E]6[CA]C]8[A]7[ECEA]8[E]]6[AC]9[1[AC]]5[CA]9[1[CA]]C5[6[E]9[1[E]]5[CA]9[1[CA]]C]9[1[6[E]9[1[E]]5[CA]9[1[CA]]C]]7[A]9[1[A]]6[ECEA]9[1[ECEA]]7[E]9[1[E]]]4[AC]9[3[AC]]3[...
result:
wrong answer incorrect path
Subtask #9:
score: 0
Memory Limit Exceeded
Test #103:
score: 0
Memory Limit Exceeded
input:
1000000000000000000
output:
result:
Subtask #10:
score: 0
Memory Limit Exceeded
Test #128:
score: 0
Memory Limit Exceeded
input:
999999999999999999