te=[]
se=[]
#「まだ素数判別カードに19がないから「(19**2)-1」までしか計算できない…」
k=19**2
for i in range(k): 
    if i == 1:#「まず1は素数じゃないよ!」
        se.append("x.1")
    elif  i % 2 == 0 and i != 2:#「素数判別カード「2」!」
        se.append("x.2")
    elif i % 3 == 0 and i != 3:#「素数判別カード「3」!」
        se.append("x.3")
    elif i % 5 == 0 and i != 5:#「素数判別カード「5」!」
        se.append("x.5")
    elif i % 7 == 0 and i != 7:#「素数判別カード「7」!」
        se.append("x.7")
    elif i % 11 == 0 and i != 11:#「素数判別カード「11」!」
        se.append("x.11")
    elif i % 13 == 0 and i != 13:#「素数判別カード「13」!」
        se.append("x.13")
    elif i % 17 == 0 and i != 17:#「素数判別カード「17」!」
        se.append("x.17")
    else:
        se.append("o")
        te.append(i)

print(f'{se}')
print(f'{te}')
print(f'総チェック数:{i}')




Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: