結果
問題 |
No.1243 約数加算
|
ユーザー |
![]() |
提出日時 | 2020-10-02 21:38:29 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
TLE
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 49,004 KB |
最終ジャッジ日時 | 2024-07-16 04:31:24 |
合計ジャッジ時間 | 4,018 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 2 TLE * 1 -- * 6 |
ソースコード
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)