Created
August 18, 2018 13:52
-
-
Save showyou/43ad696ab18dcb8d304d71c88e7bbfe8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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