Hello , I can't realize why the judge output is much strange !!! problem link : http://mirror.codeforces.com/contest/451/problem/B
my code : https://paste.ubuntu.com/25939858/
judge status : http://mirror.codeforces.com/contest/451/submission/32225322
in my compiler , answer is okay , but where is the problem ?? I have also tested in different online compilers also