結果
| 問題 |
No.1243 約数加算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-10-02 21:41:23 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 283 bytes |
| コンパイル時間 | 658 ms |
| コンパイル使用メモリ | 81,800 KB |
| 実行使用メモリ | 293,320 KB |
| 最終ジャッジ日時 | 2024-07-16 04:33:45 |
| 合計ジャッジ時間 | 6,040 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | WA * 3 TLE * 1 -- * 5 |
ソースコード
from math import gcd
import sys
sys.setrecursionlimit(10000000)
input = sys.stdin.readline
for _ in range(int(input())):
a, b = map(int, input().split())
res = []
while a != b:
k = gcd(a, b)
res.append(k)
a += k
print(" ".join(map(str, res)))