Advertisement
ForestFox

Untitled

May 2nd, 2021
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. f = open('24-1.txt')
  2. s = f.readline()
  3. k = ''
  4. ch = []
  5. for i in range(len(s)):
  6. if '1' <= s[i] <= '9':
  7. k += s[i]
  8. else:
  9. if k!='':
  10. if int(k)%2!=0:
  11. ch += [int(k)]
  12. k = ''
  13.  
  14. print(max(ch))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement