Trouble with Python

I am trying to submit solutions using Python. The answers are not being accepted by the online judge. Even though I have submitted the most optimal solutions the code is not getting accepted. Their is indeed a possibility of me writing incorrect code. Please guide me through this. Also go through the below link if possible:

Thanks in advance.

It doesnt happen usually as the time limit for Python is always greater that the time limit for C++. On most online judges time limits are 2s for C++, 3s for Java and 5s for python. The code for tilling problem 2 given in the post should not give TLE. but you can try optimising it by not taking modulous of the result at the end instead doing it at every step in the for loop itself. I am not sure what is being done in the second code though.

Hi, thanks for responding.
I actually was able to submit the first code. Their was some problem with CB ide. When i changed python 3 to python 2.7 some how it got submitted and all test cases were passed. But still in python 3 and sometimes in python 2.7 it is giving error. I am sure their is some problem with the ide.
In the second problem, I actually tried and submit various solutions and all of them are correct as properly checked by me. The question isn’t very tough. But still the ide is not accepting it. I can provide other versions of solution used for the counting binary string problem. I have mailed coding blocks and they have forwarded the issue.
Also, I have already tried modulo in every step. The same problem is still their.
Thankyou for you help.

Hey there may be a problem at the backend that will be sorted out by the developers. You can try submitting.solutions in other languages (C++, Java).
As you have already mailed the developers you can mark this doubt as resolved and close it. If you have any other doubt you can open that any time.
Thank you :smiley:

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.