Advertisement
nq1s788

5 (десятичные)

Jul 2nd, 2024
258
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.23 KB | None | 0 0
  1. #https://inf-ege.sdamgia.ru/problem?id=7663
  2. for x in range(100, 1000):
  3.     s = str(x)
  4.     a = int(s[0]) + int(s[1])
  5.     b = int(s[1]) + int(s[2])
  6.     a, b = max(a, b), min(a, b)
  7.     if str(a) + str(b) == '1412':
  8.         print(x)
  9.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement