QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#75178 | #5236. Wersja dla profesjonalistów [A] | stkwill | 4 | 2ms | 3640kb | C++14 | 1.0kb | 2023-02-04 16:16:35 | 2023-02-04 16:16:39 |
Judging History
answer
#include <bits/stdc++.h>
using int64 = long long;
const int N = 200005;
inline std::string Str(int64 n, std::string s) {
if (n == 0) return std::string();
if (n == 1) return s;
if (n <= 9) return std::string(1, char('0' + n)) + "[" + s + "]";
return "9[" + Str(n / 9, s) + "]" + Str(n % 9, s);
}
inline void Put(int64 n, std::string s) { printf("%s", Str(n, s).data()); }
inline void Solve(int64 n) {
// std::cerr << "Solve(" << n << ")" << std::endl;
if (n == 1) return void(printf("AE"));
if (n == 2) return void(printf("AAECEAE"));
if (!(n & 1)) return Put(n, "A"), Put(n - 1, "EC"), printf("E"), Solve(n - 1);
int k = n / 2;
printf("2["), Solve(k), printf("]");
Put(k, "AC"), printf("A");
Put(k, Str(k, "CE") + "C" + Str(k + 1, "A"));
Put(n, "E");
}
int main() {
std::ios::sync_with_stdio(false);
std::cin.tie(nullptr), std::cout.tie(nullptr);
int64 n;
std::cin >> n;
Solve(n), Put(n, "C"), printf("\n");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 2ms
memory: 3504kb
input:
1
output:
AEC
result:
ok correct (length = 3)
Test #2:
score: 0
Accepted
time: 2ms
memory: 3472kb
input:
2
output:
AAECEAE2[C]
result:
ok correct (length = 13)
Test #3:
score: 0
Accepted
time: 0ms
memory: 3576kb
input:
4
output:
4[A]3[EC]E2[AE]ACACEC2[A]3[E]4[C]
result:
ok correct (length = 30)
Test #4:
score: 0
Accepted
time: 2ms
memory: 3628kb
input:
5
output:
2[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]5[C]
result:
ok correct (length = 43)
Test #5:
score: 0
Accepted
time: 2ms
memory: 3540kb
input:
6
output:
6[A]5[EC]E2[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]6[C]
result:
ok correct (length = 53)
Test #6:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
7
output:
2[2[AE]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]7[C]
result:
ok correct (length = 53)
Test #7:
score: 0
Accepted
time: 2ms
memory: 3576kb
input:
10
output:
9[A]A9[EC]E2[4[A]3[EC]E2[AE]ACACEC2[A]3[E]]4[AC]A4[4[CE]C5[A]]9[E]9[C]C
result:
ok correct (length = 79)
Test #8:
score: 0
Accepted
time: 1ms
memory: 3532kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]7[AC]A9[9[CE]7[CE]C9[A]8[A]]7[9[CE]7[CE]C9[A]8[A]]9[3[E]]6[E]]9[3[AC]]7[AC]A9[3[9[3[CE]]7[CE]C9[3[A]]8[A]]]7[9[3[CE]]7[CE]C9[3[A]]8[A]]9[7[E]]6[E]9[7[C]]6[C]
result:
ok correct (length = 277)
Test #9:
score: 0
Accepted
time: 2ms
memory: 3572kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]5[AC]A5[5[CE]C6[A]]9[E]2[E]]9[AC]2[AC]A9[9[CE]2[CE]C9[A]3[A]]2[9[CE]2[CE]C9[A]3[A]]9[2[E]]5[E]]9[2[AC]]6[AC]A9[2[9[2[CE]]6[CE]C9[2[A]]7[A]]]6[9[2[CE]]6[CE]C9[2[A]]7[A]]9[5[E]]4[E]]9[5[AC]]4[AC]A9[5[9[5[CE]]4...
result:
ok correct (length = 312)
Test #10:
score: 0
Accepted
time: 1ms
memory: 3512kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]5[AC]A5[5[CE]C6[A]]9[E]2[E]]9[AC]2[AC]A9[9[CE]2[CE]C9[A]3[A]]2[9[CE]2[CE]C9[A]3[A]]9[2[E]]5[E]]9[2[AC]]6[AC]A9[2[9[2[CE]]6[CE]C9[2[A]]7[A]]]6[9[2[CE]]6[CE]C9[2[A]]7[A]]9[5[E]]4[E]]9[5[AC]]5[AC]A9[5[9[5[CE]]5[...
result:
ok correct (length = 321)
Test #11:
score: 0
Accepted
time: 0ms
memory: 3500kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]9[E]4[E]]9[AC]5[AC]A9[9[CE]5[CE]C9[A]6[A]]5[9[CE]5[CE]C9[A]6[A]]9[3[E]]2[E]]9[3[AC]]3[AC]A9[3[9[3[CE]]3[CE]C9[3[A]]4[A...
result:
ok correct (length = 526)
Test #12:
score: 0
Accepted
time: 0ms
memory: 3516kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]9[E]4[E]]9[AC]5[AC]A9[9[CE]5[CE]C9[A]6[A]]5[9[CE]5[CE]C9[A]6[A]]9[3[E]]2[E]]9[3[AC]]3[AC]A9[3[9[3[CE]]3[CE]C9[3[A]]4[A]]]3[9[3[CE]]3[CE]C9[3[A]]4[A]]9[6[E]]7[...
result:
ok correct (length = 456)
Test #13:
score: 0
Accepted
time: 0ms
memory: 3548kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]9[E]4[E]]9[AC]5[AC]A9[9[CE]5[CE]C9[A]6[A]]5[9[CE]5[CE]C9[A]6[A]]9[3[E]]2[E]]9[3[AC]]3[AC]A9[3[9[3[CE]]3[CE]C9[3[A]]4[A]]]3[9[3[CE]...
result:
ok correct (length = 479)
Test #14:
score: 0
Accepted
time: 2ms
memory: 3512kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]]9[AC]8[AC]A9[9[CE]8[CE]C9[2[A]]]8[9[CE]8[CE]C9[2[A]]]9[3[E]]8[E]]9[4[AC]]A9[4[9[4[CE]]C9[4[A]]A]]9[8[E]]E]9[8[AC]]2[AC]A9[8[9[8[CE]]2[CE]C9[8[A]]3[A]]]2[9[8[CE]]2[...
result:
ok correct (length = 486)
Test #15:
score: 0
Accepted
time: 2ms
memory: 3568kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]]9[AC]8[AC]A9[9[CE]8[CE]C9[2[A]]]8[9[CE]8[CE]C9[2[A]]]9[3[E]]8[E]]9[4[AC]]A9[4[9[4[CE]]C9[4[A]]A]]9[8[E]]E]9[8[AC]]2[AC]A9[8...
result:
ok correct (length = 515)
Subtask #2:
score: 1
Accepted
Test #16:
score: 1
Accepted
time: 2ms
memory: 3504kb
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]ACACEC2[A]3[E]]4[AC]A4[4[CE]C5[A]]9[E]]9[AC]A9[9[CE]C9[A]A]9[2[E]]E]9[2[AC]]ACA9[2[9[2[CE]]CEC9[2[A]]2[A]]]9[2[CE]]CEC9[2[A]]2[A]9[4[E]]3[E]]9[4[AC]]3[AC]A9[4[9[4[CE]]3[CE]C9[4[A]]4[A]]]3[9[4[CE]]3[CE]C9[4[A]]4[A]]9[8[E]]7[E]]9[8[AC]...
result:
ok correct (length = 555)
Test #17:
score: 0
Accepted
time: 2ms
memory: 3476kb
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]ACACEC2[A]3[E]]4[AC]A4[4[CE]C5[A]]9[E]]9[AC]A9[9[CE]C9[A]A]9[2[E]]E]9[2[AC]]ACA9[2[9[2[CE]]CEC9[2[A]]2[A]]]9[2[CE]]CEC9[2[A]]2[A]9[4[E]]3[E]]9[4[AC]]3[AC]A9[4[9[4[CE]]3[CE]C9[4[A]]4[A]]]3[9[4[CE]]3[CE]C9[4[A]]4[A]]9[8[E]]7[E]]9[8[AC]]7[AC]...
result:
ok correct (length = 507)
Test #18:
score: 0
Accepted
time: 2ms
memory: 3516kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]9[E]4[E]]9[AC]5[AC]A9[9[CE]5[CE]C9[A]6[A]]5[9[CE]5[CE]C9[A]6[A]]9[3[E]]2[E]]9[3[AC]]3[AC]A9[3[9[3[CE]]3[...
result:
ok correct (length = 809)
Test #19:
score: 0
Accepted
time: 0ms
memory: 3472kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[CE]]4[CE]C9[3[A]]5[A]]9[7[E]]]9[7[AC]]A9[7[9[...
result:
ok correct (length = 663)
Test #20:
score: 0
Accepted
time: 2ms
memory: 3640kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]]9[2[AC]]A9[2[9[2[CE]]C9[2[A]]A]]9[4[E]]E]9[4[AC]]ACA9[4[9[4[CE]]CEC9[4[A]]2[A]]]9[4[CE]]CEC9[4[A]]2[A]9[8[E]]3[E]]9[8[AC]]...
result:
ok correct (length = 934)
Test #21:
score: 0
Accepted
time: 0ms
memory: 3476kb
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: 2ms
memory: 3500kb
input:
4095
output:
2[2[2[2[2[2[2[2[2[2[2[AE]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[CE]]4[CE]C9[3[A]]5[A]]9[7[E]]]9[7[AC]]A9[7[9[7[CE]]C9[7[A]]A]]9[9[E]5[E]]E]9[9[AC]5[AC]]AC...
result:
ok correct (length = 1027)
Test #23:
score: 0
Accepted
time: 1ms
memory: 3580kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[CE]]4[CE]C9[3[A]]5[A]]9[7[E]]]9[7[AC]]A9[7[...
result:
ok correct (length = 1056)
Test #24:
score: 0
Accepted
time: 2ms
memory: 3516kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[CE]]4[CE]C9[3[A]]5[A]]9[7[E]]]9[7[A...
result:
ok correct (length = 933)
Test #25:
score: 0
Accepted
time: 2ms
memory: 3640kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]...
result:
ok correct (length = 1662)
Test #26:
score: 0
Accepted
time: 1ms
memory: 3476kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]]9[2[AC]]A9[2[9[2[CE]]C9[2[A]]A]]9[4[E]]E]9[4[AC]]2[AC]A9[4[9[4[CE]]2[CE]C9[4[A]]3[A]]]2[9[4[CE]]2[CE]C9[4[A]]3[A]]9[8[...
result:
ok correct (length = 1391)
Test #27:
score: 0
Accepted
time: 0ms
memory: 3512kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]8[AC]A8[8[CE]C9[A]]9[E]8[E]]9[2[AC]]A9[2[9[2[CE]]C9[2[A]]A]]9[4[E]]E]9[4[AC]]2[AC]A9[4[9[4[...
result:
ok correct (length = 1427)
Subtask #3:
score: 1
Accepted
Test #28:
score: 1
Accepted
time: 0ms
memory: 3576kb
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[AAECEAE]2[AC...
result:
ok correct (length = 3639)
Test #29:
score: 0
Accepted
time: 0ms
memory: 3528kb
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: 3488kb
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: 2ms
memory: 3564kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[...
result:
ok correct (length = 3385)
Test #32:
score: 0
Accepted
time: 2ms
memory: 3552kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[C...
result:
ok correct (length = 3262)
Test #33:
score: 0
Accepted
time: 2ms
memory: 3500kb
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: 2ms
memory: 3488kb
input:
786431
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]5[AC]A5[5[CE]C6[A]]9[E]2[E]]9[AC]2[AC]A9[9[CE]2[CE]C9[A]3[A]]2[9[CE]2[CE]C9[A]3[A]]9[2[E]]5[E]]9[2[AC]]5[AC]A9[2[9[2[CE]]5[CE]C9[2[A]]6[A]]]5[9[2[CE]]5[CE]C9[2[A]]6[A]]9[5[E]]2[E]]9[5[AC]]2[AC]A9[5[9[5[CE]]2[CE]C9[5[A]]3[A]]]2[9[5[C...
result:
ok correct (length = 3562)
Test #35:
score: 0
Accepted
time: 0ms
memory: 3524kb
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[AAECE...
result:
ok correct (length = 4718)
Test #36:
score: 0
Accepted
time: 0ms
memory: 3512kb
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: 2ms
memory: 3572kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]6[AC]A6[6[CE]C7[A]]9[E]4[E]]9[AC]5[AC]A9[9[CE]5[CE]C9[A]6[A]]5[9[C...
result:
ok correct (length = 3585)
Test #38:
score: 0
Accepted
time: 2ms
memory: 3560kb
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: 2ms
memory: 3488kb
input:
524287
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[AE]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3[CE]]4[CE]C9[3[A]]5[A]]9[7[E]]]9[7[AC]]A9[7[9[7[CE]]C9[7[A]]A]]9[9[E]5[E]]E]9...
result:
ok correct (length = 3337)
Test #40:
score: 0
Accepted
time: 2ms
memory: 3588kb
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]ACACEC2[A]3[E]]3[AC]A3[3[CE]C4[A]]7[E]]7[AC]A7[7[CE]C8[A]]9[E]6[E]]9[AC]6[AC]A9[9[CE]6[CE]C9[A]7[A]]6[9[CE]6[CE]C9[A]7[A]]9[3[E]]4[E]]9[3[AC]]4[AC]A9[3[9[3[CE]]4[CE]C9[3[A]]5[A]]]4[9[3...
result:
ok correct (length = 3207)
Test #41:
score: 0
Accepted
time: 2ms
memory: 3528kb
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: 3492kb
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: 2ms
memory: 3552kb
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[AAECEAE]2[AC]A2[2[CE]C3[A]]5[E]]5[AC]A5[5[CE]C6[A]]9[E]2[E]]9[AC]2[AC]A9[9[CE]2[CE]C9[A]3[A]]2[9[CE]2[CE]C9[A]3[A]]9[2[E]]5[E]]9[2[AC]]5[AC]A9[2[9[2[CE]]5[CE]C9[2[A]]6[A]]]5[9[2[C...
result:
ok correct (length = 3610)
Test #44:
score: 0
Accepted
time: 2ms
memory: 3492kb
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: 2ms
memory: 3576kb
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: 0ms
memory: 3536kb
input:
10000000000
output:
9[9[9[9[9[9[9[9[9[9[2[A]]7[A]]7[A]]2[A]]6[A]]6[A]]7[A]]8[A]]A]A]A9[9[9[9[9[9[9[9[9[9[2[EC]]7[EC]]7[EC]]2[EC]]6[EC]]6[EC]]7[EC]]8[EC]]EC]EC]E2[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...
result:
wrong answer incorrect path
Subtask #6:
score: 0
Wrong Answer
Test #55:
score: 0
Wrong Answer
time: 0ms
memory: 3576kb
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
Memory Limit Exceeded
Test #64:
score: 0
Memory Limit Exceeded
input:
100000000000000
output:
9[9[9[9[9[9[9[9[9[9[9[9[9[9[4[A]]3[A]]3[A]]]5[A]]6[A]]4[A]]2[A]]7[A]]2[A]]7[A]]5[A]]2[A]]5[A]]A9[9[9[9[9[9[9[9[9[9[9[9[9[9[4[EC]]3[EC]]3[EC]]]5[EC]]6[EC]]4[EC]]2[EC]]7[EC]]2[EC]]7[EC]]5[EC]]2[EC]]5[EC]]E2[2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[
result:
Subtask #8:
score: 0
Memory Limit Exceeded
Test #84:
score: 0
Memory Limit Exceeded
input:
99999999999999
output:
2[2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[
result:
Subtask #9:
score: 0
Memory Limit Exceeded
Test #103:
score: 0
Memory Limit Exceeded
input:
1000000000000000000
output:
9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[6[A]]5[A]]8[A]]5[A]]8[A]]3[A]]7[A]]A]4[A]]]6[A]]3[A]]6[A]]8[A]]2[A]]5[A]]2[A]]]A9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[9[6[EC]]5[EC]]8[EC]]5[EC]]8[EC]]3[EC]]7[EC]]EC]4[EC]]]6[EC]]3[EC]]6[EC]]8[EC]]2[EC]]5[EC]]2[EC]]]E2[2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[...
result:
Subtask #10:
score: 0
Memory Limit Exceeded
Test #128:
score: 0
Memory Limit Exceeded
input:
999999999999999999
output:
2[2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[0[A]/[EC]E2[