結果
| 問題 | No.1113 二つの整数 / Two Integers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-17 21:25:23 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 504 bytes |
| 記録 | |
| コンパイル時間 | 240 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 21,376 KB |
| 最終ジャッジ日時 | 2024-11-29 21:05:30 |
| 合計ジャッジ時間 | 10,802 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 9 TLE * 6 |
ソースコード
from math import gcd
from collections import Counter
#素因数分解して列挙する関数、約数列挙ではない!
def factorize(n):
ans = 1
b = 2
fct = []
while b * b <= n:
while n % b == 0:
n //= b
fct.append(b)
b = b + 1
if n > 1:
fct.append(n)
c = Counter(fct)
for v in c.values():
ans *= v+1
return ans
def check():
A, B = map(int, input().split())
g = gcd(A,B)
a = factorize(g)
if a%2==0:
return 'Even'
return 'Odd'
print(check())