結果

問題 No.36 素数が嫌い!
ユーザー 👑 colognecologne
提出日時 2022-01-23 17:10:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 252 ms / 5,000 ms
コード長 366 bytes
コンパイル時間 1,247 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 76,024 KB
最終ジャッジ日時 2023-08-19 22:31:10
合計ジャッジ時間 5,863 ms
ジャッジサーバーID
(参考情報)
judge10 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
75,904 KB
testcase_01 AC 75 ms
75,508 KB
testcase_02 AC 68 ms
71,164 KB
testcase_03 AC 68 ms
71,320 KB
testcase_04 AC 67 ms
71,208 KB
testcase_05 AC 70 ms
75,368 KB
testcase_06 AC 72 ms
75,440 KB
testcase_07 AC 71 ms
75,688 KB
testcase_08 AC 68 ms
71,384 KB
testcase_09 AC 67 ms
71,252 KB
testcase_10 AC 70 ms
75,372 KB
testcase_11 AC 129 ms
75,896 KB
testcase_12 AC 252 ms
76,024 KB
testcase_13 AC 250 ms
75,868 KB
testcase_14 AC 72 ms
75,468 KB
testcase_15 AC 68 ms
71,100 KB
testcase_16 AC 68 ms
71,360 KB
testcase_17 AC 70 ms
71,460 KB
testcase_18 AC 67 ms
71,128 KB
testcase_19 AC 79 ms
75,620 KB
testcase_20 AC 76 ms
75,464 KB
testcase_21 AC 95 ms
75,896 KB
testcase_22 AC 73 ms
75,432 KB
testcase_23 AC 73 ms
75,660 KB
testcase_24 AC 98 ms
75,840 KB
testcase_25 AC 105 ms
75,768 KB
testcase_26 AC 135 ms
75,892 KB
testcase_27 AC 73 ms
75,460 KB
testcase_28 AC 133 ms
76,016 KB
testcase_29 AC 73 ms
75,544 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools
import sys

input = sys.stdin.readline


def main():
    N = int(input())
    factor = 0
    for i in itertools.count(2):
        if i*i > N:
            break
        while N % i == 0:
            N //= i
            factor += 1

    if N != 1:
        factor += 1

    print('YES' if factor >= 3 else 'NO')


if __name__ == '__main__':
    main()
0