Skip to content

Instantly share code, notes, and snippets.

@VxDxK
Last active May 16, 2021 19:13
Show Gist options
  • Save VxDxK/b5f8f624cc89dd5806a11f005cd885ec to your computer and use it in GitHub Desktop.
Save VxDxK/b5f8f624cc89dd5806a11f005cd885ec to your computer and use it in GitHub Desktop.
EGE
############################################################################
def dividers(n):
arr = []
for i in range(1, int(n ** 0.5) + 1):
if n % i == 0:
arr.append(i)
if i*i != n:
arr.append(n // i)
arr.sort()
return arr
############################################################################
from math import *
#f = open("test.txt")
#f = open("zadanie24_1.txt")
dels = [5, 7]
ne_dels = [11, 13, 17, 19]
st = 2079
end = 43167
cout = 0
jmax = -1
jmin = 10000000000000000000
for i in range(st, end + 1):
flag = True
for j in range(len(dels)):
if i % dels[j] != 0:
flag = False
for j in range(len(ne_dels)):
if i % ne_dels[j] == 0:
flag = False
if flag:
cout += 1
jmax = max(jmax, i)
jmin = min(jmin, i)
print(cout)
print("max:", jmax)
print("min:", jmin)
############################################################################
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment