Hey, I'm relatively new to competitive programming, does anyone know what I did wrong here? http://mirror.codeforces.com/contest/810/submission/27251228
Thanks in advance
Hey, I'm relatively new to competitive programming, does anyone know what I did wrong here? http://mirror.codeforces.com/contest/810/submission/27251228
Thanks in advance
Welcome to competitive programming
First of all, I don't think BigInteger is needed here. You can see that maximum products per day is 10^9, and there will be 10^5 days maximum. Therefore worst case you have to store up to 2*10^14, Long long (64-bit integer) should be enough
Try this input:
Edit: wrong suggestion about reading the input