Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- n=input()
- print("ze,on,tw,th,fo,fi,si,se,ei,ni".split(",").index((chr(int(n[0:2],16))+chr(int(n[2:4],16))).lower()))
- ===================================================
- n,r=str(input()),[]
- m={"ONE":1,"TWO":2,"THREE":3,"FOUR":4,"FIVE":5,"SIX":6,"SEVEN":7,"EIGHT":8,"NINE":9,"ZERO":0}
- for i in range(0, len(n), 2):
- r.append(int((n[i : i + 2]),16))
- print(m.get(''.join(list(map(chr,r))).upper()))
Add Comment
Please, Sign In to add comment