結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 120 ms
58,736 KB
testcase_02 AC 35 ms
53,604 KB
testcase_03 AC 35 ms
52,756 KB
testcase_04 AC 35 ms
52,712 KB
testcase_05 AC 38 ms
58,492 KB
testcase_06 AC 39 ms
58,784 KB
testcase_07 AC 38 ms
59,320 KB
testcase_08 AC 35 ms
52,784 KB
testcase_09 AC 35 ms
52,588 KB
testcase_10 WA -
testcase_11 AC 78 ms
57,912 KB
testcase_12 AC 163 ms
57,796 KB
testcase_13 AC 164 ms
58,080 KB
testcase_14 AC 38 ms
57,856 KB
testcase_15 AC 35 ms
52,652 KB
testcase_16 AC 35 ms
53,088 KB
testcase_17 AC 35 ms
52,468 KB
testcase_18 AC 34 ms
53,144 KB
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 AC 63 ms
59,556 KB
testcase_25 WA -
testcase_26 AC 125 ms
59,496 KB
testcase_27 AC 163 ms
59,328 KB
testcase_28 AC 124 ms
58,652 KB
testcase_29 AC 179 ms
60,324 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