Advertisement
k1alo

1111

Oct 4th, 2024
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. c = 0
  2. for n in range(1001, 10000, 2):
  3.     s = str(n)
  4.     s_1 = int(s[0]) + int(s[1])
  5.     s_2 = int(s[2]) + int(s[3])
  6.     s_new1 = str(min(s_1, s_2))
  7.     s_new2 = str(max(s_1, s_2))
  8.     s_new = s_new1 + s_new2
  9.     if s_new == "616":
  10.         c = c + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement