QOJ.ac
QOJ
ID | 题目 | 提交者 | 结果 | 用时 | 内存 | 语言 | 文件大小 | 提交时间 | 测评时间 |
---|---|---|---|---|---|---|---|---|---|
#767540 | #9271. Easy Money | N_z_ | WA | 46ms | 3856kb | C++23 | 6.7kb | 2024-11-20 21:12:57 | 2024-11-20 21:13:00 |
Judging History
answer
#include<bits/stdc++.h>
using namespace std;
struct time_helper{
#ifdef LOCAL
clock_t time_last;time_helper(){time_last=clock();}void test(){auto time_now=clock();std::cerr<<"time:"<<1.*(time_now-time_last)/CLOCKS_PER_SEC<<";all_time:"<<1.*time_now/CLOCKS_PER_SEC<<std::endl;time_last=time_now;}~time_helper(){test();}
#else
void test(){}
#endif
}time_helper;
#ifdef LOCAL
#include"dbg.h"
#else
#define dbg(...) (__VA_ARGS__)
#endif
namespace Fread{const int SIZE=1<<16;char buf[SIZE],*S,*T;inline char getchar(){if(S==T){T=(S=buf)+fread(buf,1,SIZE,stdin);if(S==T)return'\n';}return *S++;}}namespace Fwrite{const int SIZE=1<<16;char buf[SIZE],*S=buf,*T=buf+SIZE;inline void flush(){fwrite(buf,1,S-buf,stdout);S=buf;}inline void putchar(char c){*S++=c;if(S==T)flush();}struct NTR{~NTR(){flush();}}ztr;}
#define getchar Fread::getchar
#define putchar Fwrite::putchar
int print_precision=10;bool print_T_endl=1;char print_between=' ';
template<typename T>struct is_char{static constexpr bool value=(std::is_same<T,char>::value||std::is_same<T,signed char>::value||std::is_same<T,unsigned char>::value);};template<typename T>struct is_integral_ex{static constexpr bool value=(std::is_integral<T>::value||std::is_same<T,__int128>::value)&&!is_char<T>::value;};template<typename T>struct is_floating_point_ex{static constexpr bool value=std::is_floating_point<T>::value||std::is_same<T,__float128>::value;};namespace Fastio{struct Reader;struct Writer;template<size_t id>struct read_tuple{template<typename...T>static void read(Reader&stream,std::tuple<T...>&x){read_tuple<id-1>::read(stream,x);stream>>get<id-1>(x);}};template<>struct read_tuple<0>{template<typename...T>static void read([[maybe_unused]]Reader&stream,[[maybe_unused]]std::tuple<T...>&x){}};template<size_t id>struct print_tuple{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){print_tuple<id-1>::print(stream,x);putchar(print_between);stream<<get<id-1>(x);}};template<>struct print_tuple<1>{template<typename...T>static void print(Writer&stream,const std::tuple<T...>&x){stream<<get<0>(x);}};template<>struct print_tuple<0>{template<typename...T>static void print([[maybe_unused]]Writer&stream,[[maybe_unused]]const std::tuple<T...>&x){}};
struct Reader{template<typename T>typename std::enable_if_t<std::is_class<T>::value,Reader&>operator>>(T&x){for(auto &y:x)*this>>y;return *this;}template<typename...T>Reader&operator>>(std::tuple<T...>&x){read_tuple<sizeof...(T)>::read(*this,x);return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1;while(c<'0'||c>'9'){if(c=='-')f*=-1;c=getchar();}x=0;while(c>='0'&&c<='9'){x=(x<<1)+(x<<3)+(c^48);c=getchar();}x*=f;return *this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Reader&>operator>>(T&x){char c=getchar();short f=1,s=0;x=0;T t=0;while((c<'0'||c>'9')&&c!='.'){if(c=='-')f*=-1;c=getchar();}while(c>='0'&&c<='9'&&c!='.')x=x*10+(c^48),c=getchar();if(c=='.')c=getchar();else return x*=f,*this;while(c>='0'&&c<='9')t=t*10+(c^48),s++,c=getchar();while(s--)t/=10.0;x=(x+t)*f;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Reader&>operator>>(T&c){c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();return *this;}Reader&operator>>(char*str){int len=0;char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str[len++]=c,c=getchar();str[len]='\0';return*this;}template<typename T1,typename T2>Reader&operator>>(std::pair<T1,T2>&x){*this>>x.first>>x.second;return *this;}Reader&operator>>(std::string&str){str.clear();char c=getchar();while(c=='\n'||c==' '||c=='\r')c=getchar();while(c!='\n'&&c!=' '&&c!='\r')str.push_back(c),c=getchar();return*this;}Reader(){}}cin;const char endl='\n';
struct Writer{typedef __int128 mxdouble;template<typename T>typename std::enable_if_t<std::is_class<T>::value,Writer&>operator<<(const T&x){for(auto q:x){*this<<q;if(!is_class<decltype(q)>::value)*this<<print_between;}if(!is_class<typename T::value_type>::value&&print_T_endl)*this<<'\n';return *this;}template<typename...T>Writer&operator<<(const std::tuple<T...>&x){print_tuple<sizeof...(T)>::print(*this,x);if(print_T_endl)*this<<'\n';return *this;}template<typename T>typename std::enable_if_t<is_integral_ex<T>::value,Writer&>operator<<(T x){if(x==0)return putchar('0'),*this;if(x<0)putchar('-'),x=-x;static int sta[45];int top=0;while(x)sta[++top]=x%10,x/=10;while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_floating_point_ex<T>::value,Writer&>operator<<(T x){if(x<0)putchar('-'),x=-x;x+=pow(10,-print_precision)/2;mxdouble _=x;x-=(T)_;static int sta[45];int top=0;while(_)sta[++top]=_%10,_/=10;if(!top)putchar('0');while(top)putchar(sta[top]+'0'),--top;putchar('.');for(int i=0;i<print_precision;i++)x*=10;_=x;while(_)sta[++top]=_%10,_/=10;for(int i=0;i<print_precision-top;i++)putchar('0');while(top)putchar(sta[top]+'0'),--top;return*this;}template<typename T>typename std::enable_if_t<is_char<T>::value,Writer&>operator<<(const T&c){putchar(c);return*this;}Writer&operator<<(char*str){int cur=0;while(str[cur])putchar(str[cur++]);return *this;}Writer&operator<<(const char*str){int cur=0;while(str[cur])putchar(str[cur++]);return*this;}template<typename T1,typename T2>Writer&operator<<(const std::pair<T1,T2>&x){*this<<x.first<<print_between<<x.second;if(print_T_endl)*this<<'\n';return *this;}Writer&operator<<(const std::string&str){int st=0,ed=str.size();while(st<ed)putchar(str[st++]);return*this;}Writer(){}}cout;}
#define cin Fastio::cin
#define cout Fastio::cout
#define endl Fastio::endl
template<class Fun>class y_combinator_result{Fun fun_;public:template<class T>explicit y_combinator_result(T &&fun): fun_(std::forward<T>(fun)) {}template<class ...Args>decltype(auto) operator()(Args &&...args){return fun_(std::ref(*this), std::forward<Args>(args)...);}};template<class Fun>decltype(auto) y_combinator(Fun &&fun){return y_combinator_result<std::decay_t<Fun>>(std::forward<Fun>(fun));}
void init();void solve(int tc);
main()
{
init();int t=1;
// cin>>t;
for(int tc=1;tc<=t;tc++)solve(tc);
}
void init()
{
}
bool chk(string s)
{
int res=0;
for(auto q:s)res=(res*10+q-'0')%7;
return res==0;
}
void solve([[maybe_unused]]int tc)
{
string s;
cin>>s;
sort(s.begin(),s.end());
vector<int>mv[7];
string t;
for(auto q:s)mv[(q-'0')%7].emplace_back(q-'0'),t+=(q-'0')%7+'0';
reverse(t.begin(),t.end());
reverse(s.begin(),s.end());
int T=10000;
do
{
if(chk(s)){cout<<s<<endl;return;}
}
while(prev_permutation(s.begin(),s.end())&&T--);
T=10000;
do
{
dbg(t);
if(chk(t)){for(auto q:t)cout<<mv[(q-'0')%7].back(),mv[(q-'0')%7].pop_back();return;}
}
while(prev_permutation(t.begin(),t.end())&&T--);
cout<<-1<<endl;
}
详细
Test #1:
score: 100
Accepted
time: 1ms
memory: 3608kb
input:
14
output:
14
result:
ok answer is '14'
Test #2:
score: 0
Accepted
time: 0ms
memory: 3644kb
input:
11
output:
-1
result:
ok answer is '-1'
Test #3:
score: 0
Accepted
time: 0ms
memory: 3780kb
input:
2020
output:
2002
result:
ok answer is '2002'
Test #4:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
1
output:
-1
result:
ok answer is '-1'
Test #5:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
4
output:
-1
result:
ok answer is '-1'
Test #6:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
2
output:
-1
result:
ok answer is '-1'
Test #7:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
7
output:
7
result:
ok answer is '7'
Test #8:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
12
output:
21
result:
ok answer is '21'
Test #9:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
150
output:
105
result:
ok answer is '105'
Test #10:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
294
output:
924
result:
ok answer is '924'
Test #11:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
70107
output:
-1
result:
ok answer is '-1'
Test #12:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
7907
output:
-1
result:
ok answer is '-1'
Test #13:
score: 0
Accepted
time: 0ms
memory: 3584kb
input:
10001
output:
10010
result:
ok answer is '10010'
Test #14:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
222221
output:
-1
result:
ok answer is '-1'
Test #15:
score: 0
Accepted
time: 1ms
memory: 3616kb
input:
999999222221
output:
-1
result:
ok answer is '-1'
Test #16:
score: 0
Accepted
time: 1ms
memory: 3604kb
input:
818181818181
output:
888888111111
result:
ok answer is '888888111111'
Test #17:
score: 0
Accepted
time: 1ms
memory: 3584kb
input:
299292999222999292292999229222299299292999222999999299999222229929292929292299222992292999922299229992292922992999999292292922299992929292999992222929922292929999929292299299992299922922222299922999999292929299922299999929999992222929222929292929292229222922929292992222992299299922999999292992992922...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
result:
ok answer is '999999999999999999999999999999...2222222222222222222222222122222'
Test #18:
score: 0
Accepted
time: 46ms
memory: 3616kb
input:
992299299299222929922999999929999299229222299992922229229229292229929222292922229922922922229929999292229929292922222922299229999299999299929922999999929999229999222999999229999229999292229222229999299292222299229999929222229222922999229999299222929222999999299222292999992222922922292929229929922999...
output:
-1
result:
ok answer is '-1'
Test #19:
score: 0
Accepted
time: 37ms
memory: 3620kb
input:
818181888118888111811888188888888118181181111181181818111881881818181811811118881111181118181111188188118188118111111188181188181881881111111111111818811888818118881181811181888111888118188188181111111111888181881818818118181811888818888811188188118118118881818818118118111811881818881818118881811111...
output:
889888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888...
result:
ok answer is '889888888888888888888888888888...1111111111111111111111111111111'
Test #20:
score: 0
Accepted
time: 45ms
memory: 3564kb
input:
811888818111188111188181811181181118881188888888818888188818811181181811118888111111181118811181818888811881181881111118818818888881881111888811888188111888111818881181188188181111111888811118118188188888818181118188111888181881811181181111188111181818818111181188188811811181181188188881881181111888...
output:
-1
result:
ok answer is '-1'
Test #21:
score: 0
Accepted
time: 43ms
memory: 3824kb
input:
777070007000007000777707707707070007007000700007007777000770700770070007077700770707707007070777000707770007700770777777070000077000070770707070777000770700007707770770070700007700000000700707077777777000000007077700007070077007077700000777007070707000777070007700077770777707000071070777007077007070...
output:
-1
result:
ok answer is '-1'
Test #22:
score: 0
Accepted
time: 45ms
memory: 3592kb
input:
777077000000077077000777070700070077777000000700770700077000007007070700077070000770007000070077070707077070007000007000707707770007077000707007007070007007707070077777707000777700007700700707077070707700070707700777700000077770077770700777070777770700000700700707000007700700707000700707007770007000...
output:
-1
result:
ok answer is '-1'
Test #23:
score: 0
Accepted
time: 43ms
memory: 3608kb
input:
770700700000070777000707777770777777707777007700777077077077777700770777000777770700770770700077707000000770700700770070007707070777777070007707077700777777077777077007700707770777070007707770077700070070000070070007700707007707770777007707770777077770777777070007000007770700077050707770000700707777...
output:
-1
result:
ok answer is '-1'
Test #24:
score: 0
Accepted
time: 0ms
memory: 3588kb
input:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999...
output:
-1
result:
ok answer is '-1'
Test #25:
score: 0
Accepted
time: 0ms
memory: 3652kb
input:
620436154163509563507919650719927952508188442784407588398637939177640354348248054810004291038561761789903334548860626608403095892847290798758572135654993008519975434571796229764177736368334992472273340855483013090697882119203723855966534418046756803623094943164349224564725971707564646549364942721091...
output:
999999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888888888777777777777777777777777777777777777777777777777777777766666666666666666666666666666666666666666666666666666666666666666555555555555555555555555555555555555555555555555...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #26:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
2026632195728579864848543337086144016485144037992364957124010616133373548349979385940601321690346736227396154306468801983025135356587910577405071226191118056463902480285733943435796863649486033446142248545419789482268038741460162529580944283182196148155943
output:
9999999999999999999999998888888888888888888888888877777777777777777666666666666666666666666666655555555555555555555555444444444444444444444444444444444444333333333333333333333333333333322222222222222222222221111111111111111111111111100000100000000000000000
result:
ok answer is '999999999999999999999999888888...1111111100000100000000000000000'
Test #27:
score: 0
Accepted
time: 0ms
memory: 3496kb
input:
3705255268646647136740457288734914
output:
9888777776666655554444443332221100
result:
ok answer is '9888777776666655554444443332221100'
Test #28:
score: 0
Accepted
time: 0ms
memory: 3616kb
input:
997986450667534848291538102850942565459984588654558321057364019277059779248703457352893163205754797977823376986820483190408495990397990369073265782324170662269019757473000751679570121713999533007929528930528896597902379121870414769214948061255490431051607453678636427224695419541935711553855496837274...
output:
999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888777777777777777777777777777777777777777777777777777777777777777776666666666666666666666666666666666666666666655555555555555555555555555555555555555555555555555555555555...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #29:
score: 0
Accepted
time: 0ms
memory: 3848kb
input:
6576048032171095208078956765910980567803215448368626985542818300431772997950624798197486134379859700138057824898351952659383578838586523039186675636844293191045771527730045937374807063134788312147589555093720576202418450374422202139564718966242425
output:
9999999999999999999999988888888888888888888888888888877777777777777777777777777776666666666666666666665555555555555555555555555555544444444444444444444444333333333333333333333333322222222222222222222222111111111111111111101000000000000000000000000
result:
ok answer is '999999999999999999999998888888...1111101000000000000000000000000'
Test #30:
score: 0
Accepted
time: 0ms
memory: 3552kb
input:
489196270915370824783160303094312338815078401366258039297545809168786099770140355416838020058055064231620732185288939005536678509506924179430108949085285118104120481875523952202109354101875247122063727470917469549502600279756476212316836665810840026777305106015567979105345025459392602134214754794178...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888877777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777666666666666666...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #31:
score: 0
Accepted
time: 0ms
memory: 3856kb
input:
962836421201452777322426371780496517858052110963437517942109757186646394331608511701281979334456861726746120604899559488055555213101010979637281212959828358325376064869406279398051917424858366306025370141889543351253215896374119321940709786950972285575444120414301609111642399362570929914225151700248...
output:
999999999999999999999999999999999999999999888888888888888888888888888888888888888887777777777777777777777777777777777777777776666666666666666666666666666666665555555555555555555555555555555555555555555555555544444444444444444444444444444444444444444444444444333333333333333333333333333333333333333333...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #32:
score: 0
Accepted
time: 0ms
memory: 3608kb
input:
978306889353099225469375690026173343180298633565539062166053191755618086213787625944137665729276887051948526179563560169528179631648039163245777106798174750263631819192729553699542350279091719601153053010557329294735457904118503433640647131790286278223893385988551068752221214648711538886201029483715...
output:
999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888877777777777777777777777777777777777777777777777777777777777776666666666666666666666666666666666666666666666666666666666666655555555555555555555555555555555555555555555555555554444444444444444...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #33:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
161615893002333073609615149196721394228472267098728101439695183478004690878987780203971230496446266888806772295444776679328451544649840037358404575491645713730992477714720187759426724773055884699838176157546282541057532765343891739109925875869976283417193490339866389199625815734497531219086200641398...
output:
999999999999999999999999999999999999999999999999999999999999999999999888888888888888888888888888888888888888888888888888888887777777777777777777777777777777777777777777777777777777777777777776666666666666666666666666666666666666666666666555555555555555555555555555555555555555555555554444444444444444...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #34:
score: 0
Accepted
time: 0ms
memory: 3544kb
input:
928339282427591086595583394278857732044482099233020196926505607741950378951469158964763630108810296266537832934124056551895334711599953666258078267610006916484018205148056106238681576996595604270121725322620947109923009250373455256996941321738887343007039627928046050955423017575077183686529135633776...
output:
999999999999999999999999999999999999999999988888888888888888888888888888888888888777777777777777777777777777777777666666666666666666666666666666666666666555555555555555555555555555555555555555555555544444444444444444444444444444333333333333333333333333333333333333222222222222222222222222222222222222...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #35:
score: 0
Accepted
time: 0ms
memory: 3824kb
input:
295383883493312820532852153882640929509250129113080094534691943542239076259889684912390750672731988071270081673587321780717472406186750471252849721166189671906815500977323114634077470432231941562797882516387727804371857824476201153452171507718831951794638047632893576418415203315314808344135775520619...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888887777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #36:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
89377001784559046428341127028535623714887946226631479730970310793167622010035112121789733820301693843574017
output:
99999999888888888777777777777777666666665555554444444443333333333333322222222222111111111111101000000000000
result:
ok answer is '999999998888888887777777777777...2222111111111111101000000000000'
Test #37:
score: 0
Accepted
time: 0ms
memory: 3548kb
input:
823395140304400292215758868836002844266712495444994350954955774440284327006914270007247558861317859477156340099879950257310430912927199332410614317197261934512773510381231440442902901041707670209286673245323092930640333219908986691471777276711884351995756060806384280861373825105189505989824739797002...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888877777777777777777777777777777777777777777777777777777777777777777777777777766666666666666666666666666666666666666666666666666666666666666666666666...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #38:
score: 0
Accepted
time: 0ms
memory: 3820kb
input:
645479788669184035907765444808931179507392308542692271137399873283288763622066006465277218531122253176235984656611513953464984949606130587601185503926727391733237090777299348250824421524159676888284567618469612816995604667820008408286666821641195925285141556835317803507388700127503685254517509673053...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999988888888888888888888888888888888888888888888888888888888888888888888888888888888888888888877777777777777777777777777777777777777777777777777777777777777777777776666666666666666666666666666666666666666666666666666666...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #39:
score: 0
Accepted
time: 1ms
memory: 3784kb
input:
404518776137841027043545348960583182629879714714413611043479627363405708373253490615514756265547090922780936665385282215181558228722970682623920858231826480044449605769375271840613300392443508268473973900357254309481297792085489378842403662315094115117383677509440025178040112683680797302665301006177...
output:
999999999999999999999999999999999999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888888777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777766666666...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #40:
score: 0
Accepted
time: 0ms
memory: 3776kb
input:
746095388372146697972983600204131365418727001389496606459004847995299053087876825116467437421832841888290527195723054331641009081560389249502403001115870986103342395664014262786628778747618547855192526965933940449938750744062410244998320538757673
output:
999999999999999999999999998888888888888888888888888877777777777777777777777776666666666666666666666665555555555555555555554444444444444444444444444444433333333333333333333333222222222222222222222211111111111111111111000001000000000000000000000000
result:
ok answer is '999999999999999999999999998888...1000001000000000000000000000000'
Test #41:
score: 0
Accepted
time: 0ms
memory: 3612kb
input:
436896323409410837509742296580456528786587475221252590456500691835304341110629740091106070438026077787240769510267377970584866098801647232760230138607069059674220500849219311671178050484871632048387313745849702575789741211175235087107820002855022289778249720721176345933052981183320920505252420892393...
output:
999999999999999999999999999999999999999999999999999999998888888888888888888888888888888888888888888888888888888888888888888888888888887777777777777777777777777777777777777777777777777777777777777777777777766666666666666666666666666666666666666666666666666666666666666666666665555555555555555555555555...
result:
ok answer is '999999999999999999999999999999...0000000000000000000000000000000'
Test #42:
score: 0
Accepted
time: 0ms
memory: 3852kb
input:
2520425012092091419638742417645313106843367405788961717056584860137009484798829687853367
output:
9999999888888888887777777777666666666555555544444444443333333322222221111111100100000000
result:
ok answer is '999999988888888888777777777766...3333322222221111111100100000000'
Test #43:
score: -100
Wrong Answer
time: 2ms
memory: 3608kb
input:
8888887777777777771000000000
output:
8888878777177777777000000000
result:
wrong answer expected '8888878777777777770000100000', found '8888878777177777777000000000'