結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-26 21:54:01 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 343 bytes |
| 記録 | |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 84,864 KB |
| 実行使用メモリ | 57,984 KB |
| 最終ジャッジ日時 | 2026-05-11 09:37:41 |
| 合計ジャッジ時間 | 7,528 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 5 TLE * 2 -- * 8 |
ソースコード
import math
a, b = map(int, input().split())
g = math.gcd(a, b)
cnt = {}
cur = g
for x in range(2, int(math.sqrt(g)) + 1):
while cur % x == 0:
cnt[x] = cnt.get(x, 0) + 1
cur //= x
if cur > 1:
cnt[cur] = cnt.get(cur, 0) + 1
ans = 1
for _, v in cnt.items():
ans *= (v + 1)
if ans % 2 == 0:
print("Even")
else:
print("Odd")