結果
| 問題 |
No.1113 二つの整数 / Two Integers
|
| コンテスト | |
| ユーザー |
ttr
|
| 提出日時 | 2020-07-17 21:27:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 441 bytes |
| コンパイル時間 | 217 ms |
| コンパイル使用メモリ | 82,300 KB |
| 実行使用メモリ | 118,352 KB |
| 最終ジャッジ日時 | 2024-11-29 21:19:14 |
| 合計ジャッジ時間 | 7,337 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 TLE * 2 |
ソースコード
A,B = map(int, input().split())
def gcd(a, b):
if a < b:
a, b = b, a
if a%b == 0:
return b
return gcd(b, a%b)
M = gcd(A, B)
dic = {}
i = 2
while i <= M**0.5:
if M%i == 0:
cnt = 0
while M%i == 0:
M //= i
cnt += 1
dic[i] = cnt
i += 1
if M > 1:
dic[M] = 1
ans = "Odd"
for key in dic:
if dic[key]%2 == 1:
ans = "Even"
break
print(ans)
ttr