結果

問題 No.36 素数が嫌い!
ユーザー human_cipherhuman_cipher
提出日時 2021-06-22 01:38:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 214 ms / 5,000 ms
コード長 302 bytes
コンパイル時間 788 ms
コンパイル使用メモリ 86,896 KB
実行使用メモリ 76,208 KB
最終ジャッジ日時 2023-09-05 02:06:08
合計ジャッジ時間 5,151 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
76,088 KB
testcase_01 AC 86 ms
76,056 KB
testcase_02 AC 76 ms
71,544 KB
testcase_03 AC 76 ms
71,156 KB
testcase_04 AC 77 ms
71,412 KB
testcase_05 AC 81 ms
76,028 KB
testcase_06 AC 83 ms
75,756 KB
testcase_07 AC 82 ms
75,916 KB
testcase_08 AC 78 ms
71,092 KB
testcase_09 AC 76 ms
71,216 KB
testcase_10 AC 80 ms
75,980 KB
testcase_11 AC 125 ms
75,904 KB
testcase_12 AC 214 ms
76,208 KB
testcase_13 AC 214 ms
75,836 KB
testcase_14 AC 81 ms
76,016 KB
testcase_15 AC 76 ms
71,204 KB
testcase_16 AC 77 ms
71,128 KB
testcase_17 AC 76 ms
71,236 KB
testcase_18 AC 77 ms
71,368 KB
testcase_19 AC 87 ms
75,840 KB
testcase_20 AC 85 ms
76,032 KB
testcase_21 AC 103 ms
76,096 KB
testcase_22 AC 84 ms
76,080 KB
testcase_23 AC 80 ms
76,132 KB
testcase_24 AC 106 ms
76,036 KB
testcase_25 AC 109 ms
75,956 KB
testcase_26 AC 143 ms
76,012 KB
testcase_27 AC 84 ms
75,992 KB
testcase_28 AC 143 ms
76,008 KB
testcase_29 AC 83 ms
76,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import sqrt

n = int(input())

div = 2
fact = list()
while div < int(sqrt(n))+1 and n > 1:
    if n % div == 0:
        while n % div == 0:
            fact.append(div)
            n //= div
    div += 1
if n > 1:
    fact.append(n)

if len(fact) >= 3:
    print("YES")
else:
    print("NO")
0