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

With reference to this question KOL16A Problem - CodeChef 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:
CodeChef: Practical coding for everyone (the one in which I took input as character array)
CodeChef: Practical coding for everyone (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.