mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-19 19:03:02 +08:00
all valid python 3
This commit is contained in:
@ -4,7 +4,7 @@ A palindromic number reads the same both ways. The largest palindrome made from
|
||||
Find the largest palindrome made from the product of two 3-digit numbers which is less than N.
|
||||
'''
|
||||
from __future__ import print_function
|
||||
limit = int(raw_input("limit? "))
|
||||
limit = int(input("limit? "))
|
||||
|
||||
# fetchs the next number
|
||||
for number in range(limit-1,10000,-1):
|
||||
@ -26,4 +26,4 @@ for number in range(limit-1,10000,-1):
|
||||
print(number)
|
||||
exit(0)
|
||||
|
||||
divisor -=1
|
||||
divisor -=1
|
||||
|
@ -12,8 +12,8 @@ for i in range(999,100,-1):
|
||||
arr.append(i*j)
|
||||
arr.sort()
|
||||
|
||||
n=int(raw_input())
|
||||
n=int(input())
|
||||
for i in arr[::-1]:
|
||||
if(i<n):
|
||||
print(i)
|
||||
exit(0)
|
||||
exit(0)
|
||||
|
Reference in New Issue
Block a user