結果

問題 No.36 素数が嫌い!
ユーザー kekurekekure
提出日時 2019-07-06 23:09:12
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 186 ms
コンパイル使用メモリ 82,896 KB
実行使用メモリ 59,936 KB
最終ジャッジ日時 2024-04-09 03:13:25
合計ジャッジ時間 4,338 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 138 ms
58,704 KB
testcase_02 AC 39 ms
53,612 KB
testcase_03 AC 40 ms
52,256 KB
testcase_04 AC 38 ms
53,180 KB
testcase_05 AC 46 ms
59,136 KB
testcase_06 AC 43 ms
58,704 KB
testcase_07 AC 42 ms
58,888 KB
testcase_08 AC 39 ms
53,600 KB
testcase_09 AC 38 ms
53,308 KB
testcase_10 WA -
testcase_11 AC 93 ms
59,080 KB
testcase_12 AC 195 ms
58,256 KB
testcase_13 AC 194 ms
58,496 KB
testcase_14 AC 43 ms
58,112 KB
testcase_15 AC 40 ms
52,852 KB
testcase_16 AC 38 ms
52,408 KB
testcase_17 AC 39 ms
52,948 KB
testcase_18 AC 38 ms
52,936 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 73 ms
59,128 KB
testcase_25 WA -
testcase_26 AC 148 ms
58,264 KB
testcase_27 AC 186 ms
59,740 KB
testcase_28 AC 148 ms
58,676 KB
testcase_29 AC 205 ms
59,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())

div = []
n = N
i = 2

limit = math.sqrt(N)

if (n == 1 or n == 2) :
    print('NO')
else :
    cnt = 0
    while(True) :
        if (n % i == 0) :
            n //= i
            cnt += 1
        else :
            i += 1
        
        if (i >= limit or cnt == 3) :
            break
    if (cnt >= 3) :
        print('YES')
    else :
        print('NO')
            
        
        








0