結果

問題 No.36 素数が嫌い!
ユーザー kekurekekure
提出日時 2019-07-07 08:11:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 486 bytes
コンパイル時間 416 ms
コンパイル使用メモリ 82,096 KB
実行使用メモリ 59,748 KB
最終ジャッジ日時 2024-04-10 12:41:16
合計ジャッジ時間 3,066 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
52,076 KB
testcase_01 AC 42 ms
58,384 KB
testcase_02 AC 34 ms
53,332 KB
testcase_03 AC 37 ms
52,736 KB
testcase_04 AC 34 ms
53,212 KB
testcase_05 AC 36 ms
58,128 KB
testcase_06 WA -
testcase_07 AC 37 ms
58,112 KB
testcase_08 AC 36 ms
52,532 KB
testcase_09 AC 35 ms
52,184 KB
testcase_10 AC 34 ms
52,460 KB
testcase_11 AC 79 ms
57,796 KB
testcase_12 AC 159 ms
58,264 KB
testcase_13 AC 153 ms
59,492 KB
testcase_14 AC 39 ms
58,952 KB
testcase_15 AC 36 ms
52,824 KB
testcase_16 AC 35 ms
52,712 KB
testcase_17 AC 34 ms
53,536 KB
testcase_18 AC 36 ms
53,616 KB
testcase_19 AC 35 ms
53,636 KB
testcase_20 AC 44 ms
58,332 KB
testcase_21 AC 35 ms
53,484 KB
testcase_22 AC 35 ms
52,732 KB
testcase_23 AC 34 ms
53,104 KB
testcase_24 AC 58 ms
58,576 KB
testcase_25 AC 36 ms
52,404 KB
testcase_26 AC 95 ms
58,448 KB
testcase_27 AC 41 ms
58,092 KB
testcase_28 AC 92 ms
57,764 KB
testcase_29 AC 41 ms
59,180 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N = int(input())

div = []
n = N
i = 2

limit = int(math.sqrt(N))

while (i <= limit) :
    if (n % i == 0) :
        n //= i
        break
    else :
        i += 1

if (n == N or n == i):
    print('NO')
else :
    limit = int(math.sqrt(n))
    while (i <= limit) :
        if (n % i == 0) :
            n //= i
            break
        else :
            i += 1
    if i == limit + 1 :
        print('NO')
    else :
        print('YES')
    

        
        








0