結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-13 01:34:57 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 496 bytes |
| 記録 | |
| コンパイル時間 | 263 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 18,464 KB |
| 最終ジャッジ日時 | 2024-07-20 18:16:03 |
| 合計ジャッジ時間 | 6,226 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | TLE * 4 -- * 11 |
ソースコード
from math import gcd
from typing import List, Tuple
def pf(n: int) -> List[Tuple[int,int]]:
r = []
for p in range(2, n):
if p * p > n:
break
e = 0
if n % p == 0:
while(n % p == 0):
n //= p
e += 1
r.append((p, e))
if n != 1:
r.append((n, 1))
return r
a,b = map(int,input().split())
g = gcd(a,b)
c = pf(g)
ans = 1
for p,e in c:
ans *= e+1
print("Odd" if ans%2 else "Even")