Weak test case of codeforce contest div 2 question 3 :Long Beautiful Integer

Question link: https://codeforces.com/contest/1269/problem/C
Hey everyone check this question as this question got accepted right now on codeforce div. 2 but I know the answer of given test case :
6 4
should be 124012 instead of 123912 , although I wrote such that it should give correct answer but i was missing something ans it was giving 123912 which is wrong and since it was 3rd question so very less time was left with me so i submitted and to my surprise it got accepted. So am i missing something or test case were really weak.
and yes what does successful and unsuccessful hack mean in codeforce , since i am new there so i don’t know about it.

Thanks for giving your precious time!!!

1 Like

first get a prefix of length k
now it is 1239 …try to form a string with it
123912…check if it is greater than or equal to original
string…if yes…we are done
else increment prefix by 1…1240 …
now generate the string 124012

1 Like

Codeforces uses a thing called System Tests, it’ll run your solution on full tests after the contest. So wait your solution will probably fail on full tests