Advertisement
NIKOLAY_TETUS

22

Jun 15th, 2021
885
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. string = ""
  2. for i in range(0, 99999):
  3.     string = str(i)
  4.     if "0" in string:
  5.         continue
  6.  
  7.     x = i
  8.  
  9.     L = 0
  10.     M = 0
  11.     R = 0
  12.     while x > 0:
  13.         R = R * 10 + x % 10
  14.         x = x // 10
  15.         if x <= R:
  16.             M = M + 1
  17.         else:
  18.             L = L + x % 10
  19.     if L == 14 and M == 3:
  20.         print(L, M, i)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement