Playing World War II : question from ACM ICPC kolkata onsite round

With reference to this question https://www.codechef.com/problems/KOL16A when I took the double values as input in a character array and then converted it to integer I got WA but when I used typecasting and round function the same code got accepted… anything wrong with the way I took input…

the two solutions:
https://www.codechef.com/viewsolution/12392122 (the one in which I took input as character array)
https://www.codechef.com/viewsolution/12392138 (the one in which I took double as input and then typecasted it )

1 Like

@shivamtanay please let me know if you find the fact behind this question. Meanwhile I also try to find.