Unable to execute more than 3 inputs


  • 0
    I

    This is my code for Python but is not able to execute for more than 3 inputs
    '''
    def palindrome(x):
    Reverse = 0
    while (x > 0):
    Reminder = x% 10
    Reverse = (Reverse * 10) + Reminder
    x = x//10
    return Reverse

    n = int(input("Please Enter any Number: "))
    num = []
    starting = (10**(n))-1
    ending = starting//10

    for p in range(starting,ending,-1):
    for q in range(starting, ending, -1):
    check = int(p * q)
    if (palindrome(check) == check):
    num.append(check)

    print(max(num)%1337)
    '''


Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.