QOJ.ac
QOJ
ID | Problem | Submitter | Result | Time | Memory | Language | File size | Submit time | Judge time |
---|---|---|---|---|---|---|---|---|---|
#310729 | #5236. Wersja dla profesjonalistów [A] | xinhaowen | 4 | 1ms | 3864kb | C++14 | 1.5kb | 2024-01-21 17:14:17 | 2024-01-21 17:14:18 |
answer
#include<string>
#include<cstdio>
#include<iostream>
#include<algorithm>
// #define inf 0x3f3f3f3f
// #define int long long
// #define getchar getchar_unlocked
// #define putchar putchar_unlocked
template<typename T>void read(T &x){
x=0;bool f=0;char ch=getchar();
for(;ch<'0'||ch>'9';ch=getchar())if(ch=='-')f=1;
for(;ch>='0'&&ch<='9';ch=getchar())x=(x<<1)+(x<<3)+(ch^48);
if(f)x=-x;
}
void write(char x){putchar(x);}
template<typename T>void write(T x){
if(x<0)putchar('-'),x=-x;
char stk[24];int cnt=0;
do stk[++cnt]=x%10+48,x/=10;while(x);
for(;cnt;)putchar(stk[cnt--]);
}
template<typename T,typename ...Args>void read(T &x,Args &...args){read(x);read(args...);}
template<typename T,typename ...Args>void write(T x,Args ...args){write(x);write(args...);}
template<typename T>T min(T x,T y){return x<y?x:y;}
template<typename T>T max(T x,T y){return x>y?x:y;}
int n;
std::string dfs(int x,std::string S){
if(x<=9){
if(x==1)return S;
else if(x)return char(x+'0')+std::string("[")+S+"]";
return "";
}
return dfs(x/9,"9["+S+"]")+dfs(x%9,S);
}
void solve(int x){
if(x==1){std::cout<<"AE";return;}
if(x&1){
std::cout<<"2[";solve(x/2);write(']');
std::cout<<dfs(x/2,"AC")<<dfs(x/2,"AC"+dfs(x/2,"EC")+dfs(x/2,"A"))<<"A"<<dfs(x,"E");
}
else std::cout<<dfs(x,"A")<<dfs(x-1,"EC")<<dfs(1,"E"),solve(x-1);
}
signed main(){
read(n);solve(n);std::cout<<dfs(n,"C");
return 0;
}
Details
Tip: Click on the bar to expand more detailed information
Subtask #1:
score: 1
Accepted
Test #1:
score: 1
Accepted
time: 1ms
memory: 3536kb
input:
1
output:
AEC
result:
ok correct (length = 3)
Test #2:
score: 0
Accepted
time: 0ms
memory: 3532kb
input:
2
output:
2[A]ECEAE2[C]
result:
ok correct (length = 13)
Test #3:
score: 0
Accepted
time: 0ms
memory: 3588kb
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: 3596kb
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: 3584kb
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: 3584kb
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: 1ms
memory: 3576kb
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: 3724kb
input:
69
output:
2[3[9[A]]7[A]3[9[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]]A3[9[E]]6[E]]3[9[AC]]7[AC]3[9[AC3[9[EC]]7[EC]3[9[A]]7[A]]]7[AC3[9[EC]]7[EC]3[9[A]]7[A]]A7[9[E]]6[E]7[9[C]]6[C]
result:
ok correct (length = 277)
Test #9:
score: 0
Accepted
time: 1ms
memory: 3476kb
input:
100
output:
9[9[A]]2[9[A]]A9[9[EC]]2[9[EC]]E2[2[2[9[A]]6[A]2[9[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]]A2[9[E]]5[E]]2[9[AC]]6[AC]2[9[AC2[9[EC]]6[EC]2[9[A]]6[A]]]6[AC2[9[EC]]6[EC]2[9[A]]6[A]]A5[9[E]]4[E]]5[9[AC]]4[AC]...
result:
ok correct (length = 312)
Test #10:
score: 0
Accepted
time: 0ms
memory: 3564kb
input:
101
output:
2[5[9[A]]5[A]5[9[EC]]4[EC]E2[2[9[A]]6[A]2[9[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]]A2[9[E]]5[E]]2[9[AC]]6[AC]2[9[AC2[9[EC]]6[EC]2[9[A]]6[A]]]6[AC2[9[EC]]6[EC]2[9[A]]6[A]]A5[9[E]]4[E]]5[9[AC]]5[AC]5[9[AC5...
result:
ok correct (length = 321)
Test #11:
score: 0
Accepted
time: 0ms
memory: 3540kb
input:
250
output:
3[9[9[A]]]7[A]3[9[9[EC]]]6[EC]E2[9[9[A]]4[9[A]]7[A]9[9[EC]]4[9[EC]]6[EC]E2[2[3[9[A]]3[A]3[9[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]]A3[9[E]]2[E]]3[9[AC]]3[AC]3[9[AC3[9[EC]]3[E...
result:
ok correct (length = 526)
Test #12:
score: 0
Accepted
time: 0ms
memory: 3596kb
input:
251
output:
2[2[6[9[A]]8[A]6[9[EC]]7[EC]E2[3[9[A]]3[A]3[9[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]]A3[9[E]]2[E]]3[9[AC]]3[AC]3[9[AC3[9[EC]]3[EC]3[9[A]]3[A]]]3[AC3[9[EC]]3[EC]3[9[A]]3[A]]A6...
result:
ok correct (length = 456)
Test #13:
score: 0
Accepted
time: 1ms
memory: 3540kb
input:
252
output:
3[9[9[A]]]9[A]3[9[9[EC]]]8[EC]E2[2[6[9[A]]8[A]6[9[EC]]7[EC]E2[3[9[A]]3[A]3[9[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]]A3[9[E]]2[E]]3[9[AC]]3[AC]3[9[AC3[9[EC]]3[EC]3[9[A]]3[A]]]...
result:
ok correct (length = 479)
Test #14:
score: 0
Accepted
time: 1ms
memory: 3748kb
input:
299
output:
2[2[8[9[A]]2[A]8[9[EC]]ECE2[4[9[A]]3[9[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]]A3[9[E]]8[E]]4[9[AC]]4[9[AC4[9[EC]]4[9[A]]]]A8[9[E]]E]8[9[AC]]2[AC]8[9[AC8[9[EC]]2[EC]8[9[A]]2[A]]]2[AC8[9[...
result:
ok correct (length = 486)
Test #15:
score: 0
Accepted
time: 1ms
memory: 3788kb
input:
300
output:
3[9[9[A]]]6[9[A]]3[A]3[9[9[EC]]]6[9[EC]]2[EC]E2[2[8[9[A]]2[A]8[9[EC]]ECE2[4[9[A]]3[9[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]]A3[9[E]]8[E]]4[9[AC]]4[9[AC4[9[EC]]4[9[A]]]]A8[9[E]]E]8[9[AC]...
result:
ok correct (length = 515)
Subtask #2:
score: 1
Accepted
Test #16:
score: 1
Accepted
time: 1ms
memory: 3540kb
input:
320
output:
3[9[9[A]]]8[9[A]]5[A]3[9[9[EC]]]8[9[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]]A2[9[E]]E]2[9[AC]]AC2[9[AC2[9[EC]]EC2[9[A]]A]]AC2[9[EC]]EC2[9[A]]AA4[9[E]]3[E]]4[9[AC]]3[AC]4[9[AC4[9[EC]]3[EC]4[9[A]]3[A]]]3[AC4[9[EC]]3[EC]4[9[A]]3[A]]A8[9[E]]7[E]]8[9[...
result:
ok correct (length = 555)
Test #17:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
321
output:
2[9[9[A]]8[9[A]]7[A]9[9[EC]]8[9[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]]A2[9[E]]E]2[9[AC]]AC2[9[AC2[9[EC]]EC2[9[A]]A]]AC2[9[EC]]EC2[9[A]]AA4[9[E]]3[E]]4[9[AC]]3[AC]4[9[AC4[9[EC]]3[EC]4[9[A]]3[A]]]3[AC4[9[EC]]3[EC]4[9[A]]3[A]]A8[9[E]]7[E]]8[9[AC]]7[...
result:
ok correct (length = 507)
Test #18:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
1000
output:
9[9[9[A]]]3[9[9[A]]]3[9[A]]A9[9[9[EC]]]3[9[9[EC]]]3[9[EC]]E2[2[2[9[9[A]]4[9[A]]7[A]9[9[EC]]4[9[EC]]6[EC]E2[2[3[9[A]]3[A]3[9[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]]A3[9[E]]2[E...
result:
ok correct (length = 809)
Test #19:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
1024
output:
9[9[9[A]]]3[9[9[A]]]5[9[A]]7[A]9[9[9[EC]]]3[9[9[EC]]]5[9[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]]A3[9[E]]4[E]]3[9[AC]]4[AC]3[9[AC3[9[EC]]4[EC]3[9[A]]4[A]]]4[AC3[9[EC]]4[EC]3[9[A]]4[A]]A7...
result:
ok correct (length = 663)
Test #20:
score: 0
Accepted
time: 0ms
memory: 3476kb
input:
1235
output:
2[2[3[9[9[A]]]7[9[A]]2[A]3[9[9[EC]]]7[9[EC]]ECE2[2[8[9[A]]4[A]8[9[EC]]3[EC]E2[2[2[9[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]]2[9[AC]]2[9[AC2[9[EC]]2[9[A]]]]A4[9[E]]E]4[9[AC]]AC4[9[AC4[9[EC]]EC4[9[A]]A]]AC4[9[EC]]EC4[9[A]]AA8[9[E]]3[E]]8[9[AC...
result:
ok correct (length = 934)
Test #21:
score: 0
Accepted
time: 0ms
memory: 3800kb
input:
4094
output:
5[9[9[9[A]]]]5[9[9[A]]]4[9[A]]8[A]5[9[9[9[EC]]]]5[9[9[EC]]]4[9[EC]]7[EC]E2[2[9[9[9[A]]]]7[9[9[A]]]2[9[A]]3[A]2[9[9[9[EC]]]]7[9[9[EC]]]2[9[EC]]2[EC]E2[9[9[9[A]]]3[9[9[A]]]5[9[A]]5[A]9[9[9[EC]]]3[9[9[EC]]]5[9[EC]]4[EC]E2[6[9[9[A]]]2[9[A]]6[A]6[9[9[EC]]]2[9[EC]]5[EC]E2[3[9[9[A]]]9[A]2[A]3[9[9[EC]]]9[EC...
result:
ok correct (length = 1296)
Test #22:
score: 0
Accepted
time: 1ms
memory: 3592kb
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]]A3[9[E]]4[E]]3[9[AC]]4[AC]3[9[AC3[9[EC]]4[EC]3[9[A]]4[A]]]4[AC3[9[EC]]4[EC]3[9[A]]4[A]]A7[9[E]]]7[9[AC]]7[9[AC7[9[EC]]7[9[A]]]]A9[9[E]]5[9[E]]E]9[9[AC]]...
result:
ok correct (length = 1027)
Test #23:
score: 0
Accepted
time: 1ms
memory: 3596kb
input:
4096
output:
5[9[9[9[A]]]]5[9[9[A]]]5[9[A]]A5[9[9[9[EC]]]]5[9[9[EC]]]5[9[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]]A3[9[E]]4[E]]3[9[AC]]4[AC]3[9[AC3[9[EC]]4[EC]3[9[A]]4[A]]]4[AC3[9[EC]]4[EC]3[9[A]]4[A]]...
result:
ok correct (length = 1056)
Test #24:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
4097
output:
2[2[9[9[9[A]]]]7[9[9[A]]]2[9[A]]5[A]2[9[9[9[EC]]]]7[9[9[EC]]]2[9[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]]A3[9[E]]4[E]]3[9[AC]]4[AC]3[9[AC3[9[EC]]4[EC]3[9[A]]4[A]]]4[AC3[9[EC]]4[EC]3[9[...
result:
ok correct (length = 933)
Test #25:
score: 0
Accepted
time: 1ms
memory: 3792kb
input:
4998
output:
6[9[9[9[A]]]]7[9[9[A]]]6[9[A]]3[A]6[9[9[9[EC]]]]7[9[9[EC]]]6[9[EC]]2[EC]E2[3[9[9[9[A]]]]3[9[9[A]]]7[9[A]]5[A]3[9[9[9[EC]]]]3[9[9[EC]]]7[9[EC]]4[EC]E2[9[9[9[A]]]6[9[9[A]]]3[9[A]]6[A]9[9[9[EC]]]6[9[9[EC]]]3[9[EC]]5[EC]E2[2[2[2[2[4[9[A]]2[A]4[9[EC]]ECE2[2[9[A]]9[EC]8[EC]E2[8[A]7[EC]E2[2[AE]ACACECAA3[E]...
result:
ok correct (length = 1662)
Test #26:
score: 0
Accepted
time: 1ms
memory: 3484kb
input:
4999
output:
2[2[2[7[9[9[A]]]6[9[A]]3[A]7[9[9[EC]]]6[9[EC]]2[EC]E2[2[2[2[4[9[A]]2[A]4[9[EC]]ECE2[2[9[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]]2[9[AC]]2[9[AC2[9[EC]]2[9[A]]]]A4[9[E]]E]4[9[AC]]2[AC]4[9[AC4[9[EC]]2[EC]4[9[A]]2[A]]]2[AC4[9[EC]]2[EC]4[9[A]]2[...
result:
ok correct (length = 1391)
Test #27:
score: 0
Accepted
time: 1ms
memory: 3572kb
input:
5000
output:
6[9[9[9[A]]]]7[9[9[A]]]6[9[A]]5[A]6[9[9[9[EC]]]]7[9[9[EC]]]6[9[EC]]4[EC]E2[2[2[7[9[9[A]]]6[9[A]]3[A]7[9[9[EC]]]6[9[EC]]2[EC]E2[2[2[2[4[9[A]]2[A]4[9[EC]]ECE2[2[9[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]]2[9[AC]]2[9[AC2[9[EC]]2[9[A]]]]A4[9[E]]...
result:
ok correct (length = 1427)
Subtask #3:
score: 1
Accepted
Test #28:
score: 1
Accepted
time: 0ms
memory: 3752kb
input:
1000000
output:
9[9[9[9[9[9[A]]]]]]7[9[9[9[9[9[A]]]]]]8[9[9[9[9[A]]]]]3[9[9[9[A]]]]6[9[9[A]]]6[9[A]]A9[9[9[9[9[9[EC]]]]]]7[9[9[9[9[9[EC]]]]]]8[9[9[9[9[EC]]]]]3[9[9[9[EC]]]]6[9[9[EC]]]6[9[EC]]E2[2[2[2[2[2[2[9[9[9[9[A]]]]]3[9[9[9[A]]]]3[9[9[A]]]8[9[A]]2[9[9[9[9[EC]]]]]3[9[9[9[EC]]]]3[9[9[EC]]]7[9[EC]]8[EC]E2[2[2[2[9[...
result:
ok correct (length = 3639)
Test #29:
score: 0
Accepted
time: 1ms
memory: 3752kb
input:
999998
output:
9[9[9[9[9[9[A]]]]]]7[9[9[9[9[9[A]]]]]]8[9[9[9[9[A]]]]]3[9[9[9[A]]]]6[9[9[A]]]5[9[A]]8[A]9[9[9[9[9[9[EC]]]]]]7[9[9[9[9[9[EC]]]]]]8[9[9[9[9[EC]]]]]3[9[9[9[EC]]]]6[9[9[EC]]]5[9[EC]]7[EC]E2[8[9[9[9[9[9[A]]]]]]4[9[9[9[9[A]]]]]9[9[9[A]]]7[9[9[A]]]7[9[A]]3[A]8[9[9[9[9[9[EC]]]]]]4[9[9[9[9[EC]]]]]9[9[9[EC]]]...
result:
ok correct (length = 3998)
Test #30:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
524286
output:
8[9[9[9[9[9[A]]]]]]7[9[9[9[9[A]]]]]8[9[9[9[A]]]]9[9[A]]6[9[A]]8[9[9[9[9[9[EC]]]]]]7[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]9[9[EC]]5[9[EC]]8[EC]E2[4[9[9[9[9[9[A]]]]]]3[9[9[9[9[A]]]]]8[9[9[9[A]]]]5[9[9[A]]]2[9[A]]8[A]4[9[9[9[9[9[EC]]]]]]3[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]5[9[9[EC]]]2[9[EC]]7[EC]E2[2[9[9[9[9[9[A]]]...
result:
ok correct (length = 4435)
Test #31:
score: 0
Accepted
time: 0ms
memory: 3804kb
input:
524288
output:
8[9[9[9[9[9[A]]]]]]7[9[9[9[9[A]]]]]8[9[9[9[A]]]]9[9[A]]6[9[A]]2[A]8[9[9[9[9[9[EC]]]]]]7[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]9[9[EC]]6[9[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]]A3...
result:
ok correct (length = 3385)
Test #32:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
524290
output:
8[9[9[9[9[9[A]]]]]]7[9[9[9[9[A]]]]]8[9[9[9[A]]]]9[9[A]]6[9[A]]4[A]8[9[9[9[9[9[EC]]]]]]7[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]9[9[EC]]6[9[EC]]3[EC]E2[4[9[9[9[9[9[A]]]]]]3[9[9[9[9[A]]]]]8[9[9[9[A]]]]5[9[9[A]]]3[9[A]]A4[9[9[9[9[9[EC]]]]]]3[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]5[9[9[EC]]]3[9[EC]]E2[2[2[2[2[2[2[2[2[2[2[...
result:
ok correct (length = 3262)
Test #33:
score: 0
Accepted
time: 0ms
memory: 3600kb
input:
786429
output:
2[6[9[9[9[9[9[A]]]]]]5[9[9[9[9[A]]]]]8[9[9[9[A]]]]3[9[9[A]]]4[9[A]]4[A]6[9[9[9[9[9[EC]]]]]]5[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]3[9[9[EC]]]4[9[EC]]3[EC]E2[3[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]8[9[9[9[A]]]]6[9[9[A]]]2[9[A]]A3[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]6[9[9[EC]]]2[9[EC]]E2[9[9[9[9[9[A]...
result:
ok correct (length = 4370)
Test #34:
score: 0
Accepted
time: 0ms
memory: 3612kb
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]]A2[9[E]]5[E]]2[9[AC]]5[AC]2[9[AC2[9[EC]]5[EC]2[9[A]]5[A]]]5[AC2[9[EC]]5[EC]2[9[A]]5[A]]A5[9[E]]2[E]]5[9[AC]]2[AC]5[9[AC5[9[EC]]2[EC]5[9[A]]2[A]]...
result:
ok correct (length = 3562)
Test #35:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
951557
output:
2[8[9[9[9[9[9[A]]]]]]4[9[9[9[A]]]]5[9[9[A]]]7[9[A]]2[A]8[9[9[9[9[9[EC]]]]]]4[9[9[9[EC]]]]5[9[9[EC]]]7[9[EC]]ECE2[4[9[9[9[9[9[A]]]]]]2[9[9[9[A]]]]2[9[9[A]]]8[9[A]]4[9[9[9[9[9[EC]]]]]]2[9[9[9[EC]]]]2[9[9[EC]]]7[9[EC]]8[EC]E2[2[2[2[2[2[5[9[9[9[A]]]]7[9[A]]8[A]5[9[9[9[EC]]]]7[9[EC]]7[EC]E2[2[9[9[9[A]]]2...
result:
ok correct (length = 4718)
Test #36:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
838702
output:
9[9[9[9[9[9[A]]]]]]5[9[9[9[9[9[A]]]]]]9[9[9[9[A]]]]7[9[9[9[A]]]]4[9[9[A]]]3[9[A]]A9[9[9[9[9[9[EC]]]]]]5[9[9[9[9[9[EC]]]]]]9[9[9[9[EC]]]]7[9[9[9[EC]]]]4[9[9[EC]]]3[9[EC]]E2[7[9[9[9[9[9[A]]]]]]8[9[9[9[A]]]]2[9[9[A]]]9[A]4[A]7[9[9[9[9[9[EC]]]]]]8[9[9[9[EC]]]]2[9[9[EC]]]9[EC]3[EC]E2[3[9[9[9[9[9[A]]]]]]4...
result:
ok correct (length = 4235)
Subtask #4:
score: 1
Accepted
Test #37:
score: 1
Accepted
time: 0ms
memory: 3824kb
input:
999999
output:
2[2[2[2[2[2[2[9[9[9[9[A]]]]]3[9[9[9[A]]]]3[9[9[A]]]8[9[A]]2[9[9[9[9[EC]]]]]3[9[9[9[EC]]]]3[9[9[EC]]]7[9[EC]]8[EC]E2[2[2[2[9[9[9[A]]]]6[9[9[A]]]8[A]2[9[9[9[EC]]]]6[9[9[EC]]]7[EC]E2[2[2[2[2[6[9[A]]6[A]6[9[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...
result:
ok correct (length = 3585)
Test #38:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
999997
output:
2[8[9[9[9[9[9[A]]]]]]4[9[9[9[9[A]]]]]9[9[9[A]]]7[9[9[A]]]7[9[A]]3[A]8[9[9[9[9[9[EC]]]]]]4[9[9[9[9[EC]]]]]9[9[9[EC]]]7[9[9[EC]]]7[9[EC]]2[EC]E2[4[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]8[9[9[A]]]3[9[A]]5[A]4[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]8[9[9[EC]]]3[9[EC]]4[EC]E2[2[9[9[9[9[9[A]]]]]]9[9[9[9[A]]]]4[9[9...
result:
ok correct (length = 3895)
Test #39:
score: 0
Accepted
time: 0ms
memory: 3528kb
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]]A3[9[E]]4[E]]3[9[AC]]4[AC]3[9[AC3[9[EC]]4[EC]3[9[A]]4[A]]]4[AC3[9[EC]]4[EC]3[9[A]]4[A]]A7[9[E]]]7[9[AC]]7[9[AC7[9[EC]]7[9[A]]]]A9[9[E]]5[9...
result:
ok correct (length = 3337)
Test #40:
score: 0
Accepted
time: 0ms
memory: 3504kb
input:
524289
output:
2[4[9[9[9[9[9[A]]]]]]3[9[9[9[9[A]]]]]8[9[9[9[A]]]]5[9[9[A]]]3[9[A]]A4[9[9[9[9[9[EC]]]]]]3[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]5[9[9[EC]]]3[9[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]]A...
result:
ok correct (length = 3207)
Test #41:
score: 0
Accepted
time: 0ms
memory: 3632kb
input:
786428
output:
9[9[9[9[9[9[A]]]]]]4[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]7[9[9[9[A]]]]6[9[9[A]]]8[9[A]]8[A]9[9[9[9[9[9[EC]]]]]]4[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]7[9[9[9[EC]]]]6[9[9[EC]]]8[9[EC]]7[EC]E2[2[3[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]8[9[9[9[A]]]]6[9[9[A]]]2[9[A]]A3[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]8[9[9[9[E...
result:
ok correct (length = 4475)
Test #42:
score: 0
Accepted
time: 1ms
memory: 3556kb
input:
786430
output:
9[9[9[9[9[9[A]]]]]]4[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]7[9[9[9[A]]]]7[9[9[A]]]A9[9[9[9[9[9[EC]]]]]]4[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]7[9[9[9[EC]]]]7[9[9[EC]]]E2[6[9[9[9[9[9[A]]]]]]5[9[9[9[9[A]]]]]8[9[9[9[A]]]]3[9[9[A]]]4[9[A]]4[A]6[9[9[9[9[9[EC]]]]]]5[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]3[9[9[EC]]]4[9[EC...
result:
ok correct (length = 4450)
Test #43:
score: 0
Accepted
time: 0ms
memory: 3580kb
input:
786432
output:
9[9[9[9[9[9[A]]]]]]4[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]7[9[9[9[A]]]]7[9[9[A]]]3[A]9[9[9[9[9[9[EC]]]]]]4[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]7[9[9[9[EC]]]]7[9[9[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...
result:
ok correct (length = 3610)
Test #44:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
724171
output:
2[2[3[9[9[9[9[9[A]]]]]]5[9[9[9[A]]]]3[9[9[A]]]7[A]3[9[9[9[9[9[EC]]]]]]5[9[9[9[EC]]]]3[9[9[EC]]]6[EC]E2[9[9[9[9[9[A]]]]]4[9[9[9[9[A]]]]]7[9[9[9[A]]]]9[9[A]]4[9[A]]7[A]9[9[9[9[9[EC]]]]]4[9[9[9[9[EC]]]]]7[9[9[9[EC]]]]9[9[EC]]4[9[EC]]6[EC]E2[2[2[9[9[9[9[A]]]]6[9[9[9[A]]]]4[9[9[A]]]6[9[A]]A9[9[9[9[EC]]]]...
result:
ok correct (length = 3973)
Test #45:
score: 0
Accepted
time: 0ms
memory: 3748kb
input:
868406
output:
9[9[9[9[9[9[A]]]]]]5[9[9[9[9[9[A]]]]]]6[9[9[9[9[A]]]]]3[9[9[9[A]]]]2[9[9[A]]]5[A]9[9[9[9[9[9[EC]]]]]]5[9[9[9[9[9[EC]]]]]]6[9[9[9[9[EC]]]]]3[9[9[9[EC]]]]2[9[9[EC]]]4[EC]E2[7[9[9[9[9[9[A]]]]]]3[9[9[9[9[A]]]]]9[9[9[A]]]5[9[9[A]]]4[9[A]]6[A]7[9[9[9[9[9[EC]]]]]]3[9[9[9[9[EC]]]]]9[9[9[EC]]]5[9[9[EC]]]4[9[...
result:
ok correct (length = 3980)
Subtask #5:
score: 0
Wrong Answer
Test #46:
score: 0
Wrong Answer
time: 1ms
memory: 3680kb
input:
10000000000
output:
3[9[9[9[9[9[9[9[9[9[A]]]]]]]]]]5[9[9[9[9[9[9[9[9[A]]]]]]]]]6[9[9[9[9[9[9[9[A]]]]]]]]7[9[9[9[9[9[9[A]]]]]]]2[9[9[9[9[9[A]]]]]]5[9[9[9[9[A]]]]]2[9[9[9[A]]]]8[9[A]]2[A]3[9[9[9[9[9[9[9[9[9[EC]]]]]]]]]]5[9[9[9[9[9[9[9[9[EC]]]]]]]]]6[9[9[9[9[9[9[9[EC]]]]]]]]7[9[9[9[9[9[9[EC]]]]]]]2[9[9[9[9[9[EC]]]]]]5[9[9...
result:
wrong answer incorrect path
Subtask #6:
score: 0
Wrong Answer
Test #55:
score: 0
Wrong Answer
time: 0ms
memory: 3648kb
input:
9999999999
output:
2[2[2[2[2[2[2[2[2[2[2[9[9[9[9[9[9[A]]]]]]]5[9[9[9[9[9[A]]]]]]2[9[9[9[9[A]]]]]7[9[9[9[A]]]]8[9[9[A]]]9[A]7[A]2[9[9[9[9[9[9[EC]]]]]]]5[9[9[9[9[9[EC]]]]]]2[9[9[9[9[EC]]]]]7[9[9[9[EC]]]]8[9[9[EC]]]9[EC]6[EC]E2[2[2[2[9[9[9[9[9[A]]]]]]8[9[9[9[9[A]]]]]2[9[9[9[A]]]]9[9[A]]A2[9[9[9[9[9[EC]]]]]]8[9[9[9[9[EC]]...
result:
wrong answer incorrect path
Subtask #7:
score: 0
Wrong Answer
Test #64:
score: 0
Wrong Answer
time: 0ms
memory: 3648kb
input:
100000000000000
output:
6[9[9[9[9[9[9[9[9[A]]]]]]]]]3[9[9[9[9[9[9[9[A]]]]]]]]7[9[9[9[9[9[9[A]]]]]]]9[9[9[9[9[A]]]]]5[9[9[9[9[A]]]]]8[9[9[9[A]]]]2[9[9[A]]]7[9[A]]A6[9[9[9[9[9[9[9[9[EC]]]]]]]]]3[9[9[9[9[9[9[9[EC]]]]]]]]7[9[9[9[9[9[9[EC]]]]]]]9[9[9[9[9[EC]]]]]5[9[9[9[9[EC]]]]]8[9[9[9[EC]]]]2[9[9[EC]]]7[9[EC]]E2[2[2[2[2[2[2[2[...
result:
wrong answer incorrect path
Subtask #8:
score: 0
Wrong Answer
Test #84:
score: 0
Wrong Answer
time: 1ms
memory: 3864kb
input:
99999999999999
output:
2[2[2[2[2[2[2[2[2[2[2[2[2[2[2[9[9[9[9[A]]]]]5[9[9[9[A]]]]9[9[A]]2[9[A]]6[A]2[9[9[9[9[EC]]]]]5[9[9[9[EC]]]]9[9[EC]]2[9[EC]]5[EC]E2[2[2[2[9[9[9[A]]]]8[9[9[A]]]2[A]2[9[9[9[EC]]]]8[9[9[EC]]]ECE2[2[6[9[9[A]]]4[9[A]]4[A]6[9[9[EC]]]4[9[EC]]3[EC]E2[3[9[9[A]]]2[9[A]]A3[9[9[EC]]]2[9[EC]]E2[9[9[A]]5[9[A]]4[A]9...
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[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[0[A]/[EC]E2[
result:
Subtask #10:
score: 0
Memory Limit Exceeded
Test #128:
score: 0
Memory Limit Exceeded
input:
999999999999999999
output:
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[0[A]/[EC]E2[