Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sum = 0
- for file in open("p94.txt", "r"):
- l = file.replace("\n", "").split(" ")
- l[0] = list(l[0])
- l[1] = list(l[1])
- l[0].reverse()
- l[1].reverse()
- sum += int(''.join(list(str(int(''.join(l[0])) + int(''.join(l[1]))))))
- print ''.join(list(str(sum))[::-1])
Advertisement
Add Comment
Please, Sign In to add comment