結果

問題 No.1794 Continued Fraction
ユーザー Kanten4205
提出日時 2021-04-04 15:40:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 41 ms / 2,000 ms
コード長 166 bytes
コンパイル時間 154 ms
コンパイル使用メモリ 82,380 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-09-16 19:16:05
合計ジャッジ時間 2,634 ms
ジャッジサーバーID
(参考情報)
judge6 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

N, M = list(map(int, input().split()))
A = N
B = M
ans = []
while B != 0 :
    Q = int(A / B)
    ans.append(Q)
    C = A - B * Q
    A = B
    B = C
    
print(*ans)
0