結果
問題 |
No.8023 素数判定するだけ
|
ユーザー |
![]() |
提出日時 | 2025-01-30 21:57:46 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 1,000 ms |
コード長 | 284 bytes |
コンパイル時間 | 361 ms |
コンパイル使用メモリ | 12,160 KB |
実行使用メモリ | 10,496 KB |
最終ジャッジ日時 | 2025-01-30 21:57:51 |
合計ジャッジ時間 | 4,602 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 25 |
ソースコード
N=int(input()) import math I=int(True) num=[I,I] z=math.log(I,len(num)) need=int(math.sqrt(N)) for a in range(need): if N%len(num)==z: ans="NO" break else: ans="YES" num.append(I) if N==I: ans="NO" elif N==round(math.log(len(num),math.sqrt(len(num)))): ans="YES" print(ans)