Question link:https://codeforces.com/problemset/problem/318/A
my solutin:https://ide.codingblocks.com/s/407507
i am getting memory limit exceeded please tell what is my error
Memory limit exeeded
See the constraints, it’s of 10^12 you will of course get MLE for this. Try to do this question in O(1) time. That means only by doing single operations.
oh ok thanks
is 10^9 computation allowed in 1 sec?
Not sure , it’s either 10^9 or 10^8.
Sometimes it depends on server too. So i prefer for 10^8.
1 Like
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.