Please explain whats wrong :


#1

failed with some test cases:

class Solution:
# @param A : integer
# @param B : integer
# @param C : integer
# @return an integer
def solve(self, A, B, C):
l=[]
for i in range(1,B+1):
l.append(i)
while len(l)<=A:
l+=l

    for index in range(C-1,len(l)):
        A-=1
        
        if A==0:
            return l[index]