結果
問題 |
No.1794 Continued Fraction
|
ユーザー |
👑 ![]() |
提出日時 | 2021-12-23 18:14:00 |
言語 | PyPy3 (7.3.15) |
結果 |
RE
|
実行時間 | - |
コード長 | 309 bytes |
コンパイル時間 | 257 ms |
コンパイル使用メモリ | 82,424 KB |
実行使用メモリ | 66,876 KB |
最終ジャッジ日時 | 2024-09-17 16:34:34 |
合計ジャッジ時間 | 4,643 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 17 RE * 11 |
ソースコード
""" """ import sys from sys import stdin N,M = map(int,stdin.readline().split()) ans = [] while True: if N == 1: ans.append(0) ans.append(M) break else: p = N // M ans.append(p) N,M = M , N % M while ans[-1] == 0: del ans[-1] print (*ans)