Editorial for WC '17 Contest 1 J2 - How's the Weather?
Remember to use this editorial only when stuck, and not to copy-paste code from it. Please be respectful to the problem author and editorialist.
Submitting an official solution before solving the problem yourself is a bannable offence.
Submitting an official solution before solving the problem yourself is a bannable offence.
Rewriting the given formula to isolate , we arrive at
. We can then input the integer
, plug it into this formula, and output the resulting value of
. We don't need to worry about integer versus floating point division due to the guarantee that
will come out to an integer.
Comments