for i in range(2,num):
for i in range(int(q)):
for j in range(len(a),int(b[i])+1):
for j in range(int(b[i]),int(b[i])+1):
if a[j]==” “:
for y in range(2,int(k)+1):
for z in range(int(b[i]),int(b[i])+1):
if a[z]!=" " and a[z]%y==0:
Where is the question? Also, please format your code.
Hey, could you please give me your email id or mail me once at firstname.lastname@example.org
So that I can send you the question and my code.
It would be a great help.
why you can’t share a link or image here?
This is the question and below is my code.
Could you please tell me what mistake have I made.
Thanks a Lot.
at first sight I would say that one error might be that you are saying that 2 is not prime
no, it returns 1 when the input to the checkprime function is 2
yep, you’re right.
The WA veredict might come from the “print(a)” line. You are not expected to output anything in first type queries. Anyway, I tried your code without that line and now the veredict is TLE, so you should try to optimize it
I only added print(a) when I was trying to debug the code, it is not a part of the initial code and still I am getting a wrong answer.
Thanks for helping, though