dxnge

41

Dec 4th, 2021
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.25 KB | None | 0 0
  1. for i in range(10000):
  2.     x, a, b, d = i, 0, 0, 0
  3.     while x > 0:
  4.         if d % 2 == 0:
  5.             a += x%10
  6.         else:
  7.             b += x%10
  8.         x //= 10
  9.         d += 1
  10.     if a == 14 and b == 12:
  11.         print(i)
  12.         break
  13.  
Advertisement
Add Comment
Please, Sign In to add comment