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