Advertisement
nq1s788

Untitled

Jan 29th, 2025
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. #5857 https://kpolyakov.spb.ru/school/ege/gen.php?action=viewAllEgeNo&egeId=25&cat157=on&cat158=on&cat159=on&cat172=on
  2. for d in range(4):
  3.     r = 7
  4.     if d == 3:
  5.         r = 4
  6.     for x in range(1, r):
  7.         for y in range(10**d):
  8.             Y = str(y)
  9.             if ('7' in Y) or ('8' in Y) or ('9' in Y):
  10.                 continue
  11.             Y = '0' * (d - len(Y)) + Y
  12.             if d == 0:
  13.                 Y = ''
  14.             #?213 * 5664
  15.             n = int(str(x) + '213' + Y + '5664', 7)
  16.             if n % 333 == 0:
  17.                 print(n, n // 333)
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement