Advertisement
nq1s788

25 найти делитель заканч на 9

Apr 12th, 2025
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.41 KB | None | 0 0
  1. #25 https://kpolyakov.spb.ru/school/ege/gen.php?action=viewVar&answers=on&varId=4
  2. for x in range(800001, 801001):
  3.     deli = []
  4.     for d in range(2, int(x**0.5) + 1):
  5.         if x % d != 0:
  6.             continue
  7.         if d != 9 and d % 10 == 9:
  8.             deli.append(d)
  9.         p = x // d
  10.         if p != 9 and p % 10 == 9:
  11.             deli.append(p)
  12.     if len(deli) != 0:
  13.         print(x, min(deli))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement