I have solved the question found the logic and wrote the code i am not asking the solution but when i just submit the code in second testcase
"wrong answer 35th numbers differ — expected: '2', found: '22'" my code would just output only one answer and it is single digit...
missing endl... in your else statement
Thanks got it I kinda spent more and 90 minutes on this problem to figure out the logic and I didn't check my code properly
It's because you don't use endl on the else statement! Change: else cout<<(k+(n-1))/n; to: else cout<<(k+(n-1))/n<<endl;
Thanks,got it
try this
The issue was mainly with your last line if im not wrong or the spacing
Yeah
I go it