結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2021-08-07 17:59:08 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 459 bytes |
コンパイル時間 | 70 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-09-18 19:35:42 |
合計ジャッジ時間 | 11,799 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 25 WA * 1 |
ソースコード
import math N = int(input()) def is_prime(n): i = 2 result = [] M = n while i < math.sqrt(n): if n % i == 0: result.append(i) # print(result) if len(result) >= 2: if result[0] * result[1] < M: return 'YES' else: return 'NO' n = n // i elif n % i > 0: i += 1 return 'NO' print(is_prime(N))