結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2023-04-02 08:46:28 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 1,010 ms / 5,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 611 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-09-24 19:32:16 |
合計ジャッジ時間 | 13,707 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
ソースコード
import math n = int(input()) def is_prime(n): cnt = 0 for i in range(2, int(math.sqrt(n)) + 1): while n % i == 0: n //= i cnt += 1 if n != 1: cnt += 1 return cnt if is_prime(n) < 3: print("NO") else: print("YES")