Advertisement
Fahad235

Untitled

Sep 17th, 2021
1,043
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.26 KB | None | 0 0
  1. #i =45,67,107,151,89,121
  2. import math
  3. inp = input().split(',')
  4. inp = list(tuple(inp))
  5. a=[]
  6. inp = list(inp)
  7. for i in inp:
  8.   if int(i) == 151:
  9.     a.append(0)
  10.   elif int(i) == 121 or int(i) == 107:
  11.     a.append(2)
  12.   else:
  13.     a.append(1)
  14. print(sum(a))
  15.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement