結果
| 問題 |
No.8023 素数判定するだけ
|
| コンテスト | |
| ユーザー |
harurun
|
| 提出日時 | 2020-10-23 15:42:37 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 359 bytes |
| コンパイル時間 | 229 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2024-07-21 10:10:10 |
| 合計ジャッジ時間 | 4,729 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 25 |
ソースコード
from random import randint
from math import gcd
from operator import sub,add,floordiv,mul
import sys
N=int(input())
i=sub(N,N)
t=floordiv(N,N)
u=sub(ord("i"),ord("A"))
s=add(t,t)
if N==t:
print("No")
sys.exit()
if N==s:
print("Yes")
sys.exit()
while i<u:
a=randint(s,sub(N,t))
if gcd(a,N)!=t:
print("No")
break
i+=t
else:
print("Yes")
harurun