Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fin = open("baza.in", 'r')
- fout = open("baza.out", 'w')
- s = fin.readline()
- c = 0
- for i in xrange(len(s), 0, -1):
- c += (ord(s[i-1]) - ord('a')) * (26 ** (len(s)-i))
- fout.write(str(c))
- fin.close()
- fout.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement