Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fin = open('input.txt', 'r', encoding='utf-8')
- fout = open('output.txt', 'w', encoding='utf-8')
- n = fin.read().rstrip()
- n = "0" * (4 - len(n)) + n
- if n == n[::-1]:
- print(1, file=fout)
- else:
- print(2, file=fout)
- fin.close()
- fout.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement