Advertisement
Korotkodul

tr10.n5

Jun 10th, 2023 (edited)
462
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.20 KB | None | 0 0
  1. k = 0
  2. for i in range(1000, 10000):
  3.     s = str(i)
  4.     if int(s[0]) % 4 != 0:
  5.         continue
  6.     s = '9' + s[1:]
  7.     if int(s) % 8 != 4:
  8.         continue
  9.     #print(i)
  10.     k += 1
  11. print(k)
  12.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement