what the compiler difference???

i have run the my code in codeblocks and also tried in hackerearth ide (https://code.hackerearth.com/05e03cB?key=4d6ba6e2ed278e4ea0a103e6d751871e) its working fine and giving required output but when using codechef ide output goes unpridictable i.e different result with same code

and in hackerearth its showing 64KB file but in codechef around 15KB why???

Compiler difference means you have done some mistake in your program, like using uninitialized variables, letting it go in undefined behavior and so on.

I cannot see your code in that link, so cant comment further. Look at your code again and try to find out any such mistake.