結果
問題 | No.36 素数が嫌い! |
ユーザー | mitsushino |
提出日時 | 2018-01-12 14:33:43 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 488 bytes |
コンパイル時間 | 94 ms |
コンパイル使用メモリ | 10,664 KB |
実行使用メモリ | 8,048 KB |
最終ジャッジ日時 | 2023-08-25 15:32:55 |
合計ジャッジ時間 | 13,635 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 672 ms
7,936 KB |
testcase_01 | AC | 66 ms
7,868 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | AC | 17 ms
7,964 KB |
testcase_09 | AC | 16 ms
7,932 KB |
testcase_10 | AC | 16 ms
7,876 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 26 ms
8,032 KB |
testcase_15 | AC | 16 ms
7,896 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | AC | 16 ms
7,924 KB |
testcase_19 | AC | 129 ms
8,036 KB |
testcase_20 | AC | 106 ms
7,944 KB |
testcase_21 | AC | 380 ms
8,028 KB |
testcase_22 | AC | 58 ms
7,904 KB |
testcase_23 | AC | 34 ms
7,928 KB |
testcase_24 | AC | 415 ms
7,872 KB |
testcase_25 | AC | 499 ms
7,944 KB |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
ソースコード
# -*- coding: utf-8 -*- import math def prime_factorization(N): i = 2 count = 0 while i <= math.sqrt(N): if N % i == 0: N //= i count += 1 if count > 2: print('YES') return else: i += 1 if N > 1: count += 1 if count > 2: print('YES') return print('No') if __name__ == '__main__': N = int(input()) prime_factorization(N)