結果

問題 No.36 素数が嫌い!
ユーザー nanaenanae
提出日時 2017-03-28 22:09:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 234 ms / 5,000 ms
コード長 356 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 87,052 KB
実行使用メモリ 75,740 KB
最終ジャッジ日時 2023-09-09 07:57:04
合計ジャッジ時間 4,859 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
75,588 KB
testcase_01 AC 77 ms
75,568 KB
testcase_02 AC 71 ms
71,364 KB
testcase_03 AC 72 ms
71,304 KB
testcase_04 AC 72 ms
71,276 KB
testcase_05 AC 75 ms
75,432 KB
testcase_06 AC 74 ms
75,364 KB
testcase_07 AC 76 ms
75,540 KB
testcase_08 AC 73 ms
71,064 KB
testcase_09 AC 72 ms
71,064 KB
testcase_10 AC 75 ms
75,388 KB
testcase_11 AC 127 ms
75,492 KB
testcase_12 AC 234 ms
75,560 KB
testcase_13 AC 233 ms
75,528 KB
testcase_14 AC 75 ms
75,360 KB
testcase_15 AC 72 ms
71,228 KB
testcase_16 AC 71 ms
71,360 KB
testcase_17 AC 72 ms
71,360 KB
testcase_18 AC 73 ms
71,200 KB
testcase_19 AC 81 ms
75,508 KB
testcase_20 AC 78 ms
75,600 KB
testcase_21 AC 96 ms
75,740 KB
testcase_22 AC 76 ms
75,676 KB
testcase_23 AC 76 ms
75,592 KB
testcase_24 AC 100 ms
75,504 KB
testcase_25 AC 103 ms
75,548 KB
testcase_26 AC 130 ms
75,540 KB
testcase_27 AC 77 ms
75,556 KB
testcase_28 AC 128 ms
75,508 KB
testcase_29 AC 75 ms
75,480 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    N = int(input())
    pfs = []

    for p in range(2, N + 1):
        if p**2 > N:
            break
        while N % p == 0:
            pfs.append(p)
            N //= p

    if N > 1:
        pfs.append(N)

    # print(pfs)

    if len(pfs) < 3:
        print('NO')
    else:
        print('YES')

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