結果

問題 No.36 素数が嫌い!
ユーザー kekurekekure
提出日時 2019-07-06 22:40:26
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 430 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 60,048 KB
最終ジャッジ日時 2024-04-09 02:51:28
合計ジャッジ時間 7,374 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 203 ms
58,664 KB
testcase_02 AC 36 ms
53,332 KB
testcase_03 AC 36 ms
53,128 KB
testcase_04 AC 35 ms
52,812 KB
testcase_05 AC 40 ms
58,504 KB
testcase_06 AC 40 ms
58,948 KB
testcase_07 AC 39 ms
59,392 KB
testcase_08 AC 36 ms
52,320 KB
testcase_09 AC 36 ms
52,632 KB
testcase_10 WA -
testcase_11 AC 79 ms
58,956 KB
testcase_12 AC 164 ms
58,224 KB
testcase_13 AC 163 ms
58,276 KB
testcase_14 AC 39 ms
57,584 KB
testcase_15 AC 35 ms
52,504 KB
testcase_16 AC 35 ms
52,804 KB
testcase_17 AC 36 ms
52,796 KB
testcase_18 AC 35 ms
52,264 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 177 ms
58,964 KB
testcase_25 WA -
testcase_26 AC 545 ms
58,300 KB
testcase_27 AC 371 ms
58,760 KB
testcase_28 AC 532 ms
58,144 KB
testcase_29 AC 373 ms
59,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())

limit = int(math.sqrt(N))
div = []
n = N
i = 2

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