結果

問題 No.36 素数が嫌い!
ユーザー Konton7Konton7
提出日時 2019-05-17 15:42:00
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 542 bytes
コンパイル時間 312 ms
コンパイル使用メモリ 11,820 KB
実行使用メモリ 237,400 KB
最終ジャッジ日時 2023-10-17 07:21:23
合計ジャッジ時間 13,328 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 210 ms
115,448 KB
testcase_01 AC 664 ms
186,784 KB
testcase_02 AC 29 ms
10,172 KB
testcase_03 AC 29 ms
10,120 KB
testcase_04 AC 29 ms
10,172 KB
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 AC 30 ms
10,372 KB
testcase_09 AC 31 ms
10,636 KB
testcase_10 AC 31 ms
10,616 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 271 ms
151,072 KB
testcase_15 AC 29 ms
10,172 KB
testcase_16 AC 29 ms
10,172 KB
testcase_17 AC 29 ms
10,088 KB
testcase_18 AC 29 ms
10,264 KB
testcase_19 AC 441 ms
98,532 KB
testcase_20 AC 978 ms
236,872 KB
testcase_21 AC 809 ms
183,352 KB
testcase_22 AC 873 ms
188,840 KB
testcase_23 AC 523 ms
117,296 KB
testcase_24 AC 349 ms
129,388 KB
testcase_25 AC 231 ms
127,472 KB
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
plist = [2] + [ i for i in range(3,int(n**0.5)+2,2) ]

if n < 7:
    print("NO")

else:
    q = 0
    clist = []
    for i in plist:
        if n % i == 0:
            clist.append(i)
            n //= i
            if n % i == 0:
                print("YES")
                q = 1
                break
            elif len(clist) == 3:
                print("YES")
                q = 1
                break
    if q == 0:
        if n != 1:
            print("YES")
        else:
            print("NO")
                
0