https://www.codechef.com/LTIME95C/problems/EQUINOX
My python code was accepted but c++ one wasn’t ! Please tell what is the bug in c++ code ??
https://www.codechef.com/LTIME95C/problems/EQUINOX
My python code was accepted but c++ one wasn’t ! Please tell what is the bug in c++ code ??
@aman212yadav
I did that only initially !
I used long long int but as it wasn’t accepted so I changed it to int !
This happened to me in past contests too…when I coded the same program in Python my answer was accepted !
Also still not accepted…
check now->
bro long long and long long int is same thing.
here in ur code u are taking summation due to which the overall result might exceed the range of int.
so to avoid it we use long long
there is no such logic.
but are same
ok then for CP can you please specify what datatype for integers shall I choose for different constraints ?
…
if data can exceed 10^9 range the use long long otherwise int is fine
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.