結果

問題 No.36 素数が嫌い!
ユーザー tnoda_
提出日時 2015-07-31 17:22:56
言語 Python2
(2.7.18)
結果
WA  
実行時間 -
コード長 247 bytes
コンパイル時間 280 ms
コンパイル使用メモリ 7,068 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-17 22:59:15
合計ジャッジ時間 3,731 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 19 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

def factor(x):
    i = 2
    while i * i < x:
        if x % i == 0:
            return i
        i += 1
    return -1

N = input()
p = factor(N)
if p < 0:
    print('NO')
    quit()
p = factor(N)
if p < 0:
    print('NO')
    quit()
print('YES')
0