Skip to content

Instantly share code, notes, and snippets.

@navichok26
Created December 18, 2020 12:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save navichok26/24237a416f9f657f43564170e4c43925 to your computer and use it in GitHub Desktop.
Save navichok26/24237a416f9f657f43564170e4c43925 to your computer and use it in GitHub Desktop.
25 Задание по инфе
from math import *
for i in range(174457, 174505+1):
count_d = 0 # Кол-во делителей числа
delit = 0 # Один из делителей нужного числа
for d in range(2, round(sqrt(i))+1):
if i % d == 0: # Если i делится на d
count_d += 2
delit = d # Сохраняем меньший делитель
if count_d == 2:
print(delit, i//delit) # Выводим числа в нужно порядке
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment