結果

問題 No.1794 Continued Fraction
ユーザー rlangevin
提出日時 2022-12-31 01:30:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 44 ms / 2,000 ms
コード長 160 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 52,224 KB
最終ジャッジ日時 2024-11-25 23:39:12
合計ジャッジ時間 3,013 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 28
権限があれば一括ダウンロードができます

ソースコード

diff #

def f(n, m):
    if n == 0 or m == 0:
        return 
    ans.append(n//m)
    return f(m, n % m)

N, M = map(int, input().split())
ans = []
f(N, M)
print(*ans)
0