Skip to content

Instantly share code, notes, and snippets.

@showyou
Created August 18, 2018 13:52
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 showyou/43ad696ab18dcb8d304d71c88e7bbfe8 to your computer and use it in GitHub Desktop.
Save showyou/43ad696ab18dcb8d304d71c88e7bbfe8 to your computer and use it in GitHub Desktop.
N = int(input())
# 約数の計算
def count_yakusuu(n):
c = 0
for j in range(1, n+1):
if n % j == 0:
#print("n % j ==0", n, j)
c += 1
return c
cnt = 0
for i in range(1,N+1,2):
c = count_yakusuu(i)
#print("i,c:",i,c)
if count_yakusuu(i) == 8:
#print(i, "is 8")
cnt += 1
print(cnt)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment