結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
neterukun
|
| 提出日時 | 2020-07-17 22:02:44 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 26 ms / 1,000 ms |
| + 256µs | |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 755 ms |
| コンパイル使用メモリ | 81,152 KB |
| 実行使用メモリ | 54,784 KB |
| 最終ジャッジ日時 | 2026-10-02 10:47:05 |
| 合計ジャッジ時間 | 2,194 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 15 |
ソースコード
def gcd(a: int, b: int) -> int:
"""a, bの最大公約数(greatest common divisor: GCD)を求める
計算量: O(log(min(a, b)))
"""
while b:
a, b = b, a % b
return a
a, b = map(int, input().split())
gcd_ = gcd(a, b)
if int(gcd_ ** 0.5) == gcd_ ** 0.5:
print("Odd")
else:
print("Even")
neterukun