結果

問題 No.36 素数が嫌い!
ユーザー kekurekekure
提出日時 2019-07-06 22:48:23
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 431 bytes
コンパイル時間 1,022 ms
コンパイル使用メモリ 82,284 KB
実行使用メモリ 59,716 KB
最終ジャッジ日時 2024-04-09 02:57:33
合計ジャッジ時間 3,517 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,064 KB
testcase_01 AC 42 ms
59,028 KB
testcase_02 AC 35 ms
52,692 KB
testcase_03 AC 36 ms
52,076 KB
testcase_04 WA -
testcase_05 AC 38 ms
59,404 KB
testcase_06 AC 41 ms
58,896 KB
testcase_07 AC 39 ms
58,328 KB
testcase_08 AC 36 ms
52,816 KB
testcase_09 AC 35 ms
53,776 KB
testcase_10 AC 36 ms
52,748 KB
testcase_11 AC 80 ms
58,200 KB
testcase_12 AC 165 ms
58,332 KB
testcase_13 WA -
testcase_14 AC 39 ms
58,152 KB
testcase_15 AC 35 ms
53,536 KB
testcase_16 AC 35 ms
52,784 KB
testcase_17 AC 35 ms
53,452 KB
testcase_18 AC 35 ms
52,756 KB
testcase_19 AC 34 ms
53,700 KB
testcase_20 AC 43 ms
58,592 KB
testcase_21 AC 35 ms
53,552 KB
testcase_22 AC 35 ms
53,132 KB
testcase_23 AC 35 ms
52,540 KB
testcase_24 AC 58 ms
58,868 KB
testcase_25 AC 36 ms
52,804 KB
testcase_26 AC 127 ms
59,404 KB
testcase_27 AC 165 ms
59,080 KB
testcase_28 AC 125 ms
59,716 KB
testcase_29 AC 181 ms
58,680 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 == 2) :
            break
    if (cnt == 2) :
        print('YES')
    else :
        print('NO')
            
        
        








0