結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-24 11:28:19 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 349 ms / 1,000 ms |
| コード長 | 389 bytes |
| コンパイル時間 | 92 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-24 22:05:05 |
| 合計ジャッジ時間 | 6,651 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
import math
def square(a):
r=round(math.sqrt(a))
return r*r==a
a,b=map(int,input().split())
g=math.gcd(a,b)
# p^k (k>=3) は除く
even=False
for d in range(2,10**6+1):
cnt=0
while g%d==0:
g//=d
cnt+=1
even|=cnt%2==1
# p^1
# p^2
# が残る。
# ただしp>1e6
# p,pp,pq
if even or (g>0 and not(square(g))):
print("Even")
else:
print("Odd")