結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-15 20:44:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 486 bytes |
| 記録 | |
| コンパイル時間 | 235 ms |
| コンパイル使用メモリ | 81,920 KB |
| 実行使用メモリ | 62,464 KB |
| 最終ジャッジ日時 | 2024-10-10 23:52:48 |
| 合計ジャッジ時間 | 2,694 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | TLE * 1 -- * 14 |
ソースコード
def gcd(x, y):
x_list = []
y_list = []
cnt = 1
while x > cnt :
if x % cnt == 0:
x_list.append(cnt)
cnt += 1
cnt = 1
while y > cnt:
if y % cnt == 0:
y_list.append(cnt)
cnt += 1
cnt_x, cnt_y = 0, 0
gcd_list = []
for t_x in x_list:
for t_y in y_list:
if t_x == t_y:
gcd_list.append(t_y)
return max(gcd_list)
A,B = map(int,input().split())
g = gcd(A,B)
if (g**0.5).is_integer():
print("Odd")
else:
print("Even")