結果
| 問題 | No.1243 約数加算 |
| コンテスト | |
| ユーザー |
titia
|
| 提出日時 | 2020-10-02 21:38:29 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 309 ms |
| コンパイル使用メモリ | 21,540 KB |
| 実行使用メモリ | 84,732 KB |
| 最終ジャッジ日時 | 2026-08-13 14:14:04 |
| 合計ジャッジ時間 | 7,513 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 |
| other | AC * 2 TLE * 2 -- * 5 |
ソースコード
import sys
input = sys.stdin.readline
from math import gcd
T=int(input())
for tests in range(T):
A,B=map(int,input().split())
ANS=[]
while A!=B:
ANS.append(gcd(A,B))
A+=gcd(A,B)
print(len(ANS))
print(*ANS)
titia