Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- k = 0
- for i in range(N):
- if a[i]>99 and a[i]<1000 and a[i]%10 == 9 and a[i]%100 != 99:
- k = k + a[i]
- if k>0:
- print(k)
- else:
- print(-1)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement