結果

問題 No.1794 Continued Fraction
ユーザー MasKoaTSMasKoaTS
提出日時 2021-12-24 20:54:51
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 733 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 81,716 KB
実行使用メモリ 85,796 KB
最終ジャッジ日時 2023-10-20 00:08:50
合計ジャッジ時間 6,529 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 134 ms
85,792 KB
testcase_01 AC 131 ms
85,792 KB
testcase_02 AC 131 ms
85,788 KB
testcase_03 AC 132 ms
85,788 KB
testcase_04 AC 131 ms
85,788 KB
testcase_05 AC 131 ms
85,788 KB
testcase_06 AC 131 ms
85,792 KB
testcase_07 AC 131 ms
85,792 KB
testcase_08 AC 131 ms
85,788 KB
testcase_09 AC 130 ms
85,788 KB
testcase_10 AC 131 ms
85,788 KB
testcase_11 AC 131 ms
85,792 KB
testcase_12 AC 130 ms
85,788 KB
testcase_13 AC 130 ms
85,792 KB
testcase_14 AC 130 ms
85,788 KB
testcase_15 AC 131 ms
85,788 KB
testcase_16 AC 128 ms
85,788 KB
testcase_17 AC 127 ms
85,796 KB
testcase_18 AC 128 ms
85,788 KB
testcase_19 AC 130 ms
85,788 KB
testcase_20 AC 130 ms
85,792 KB
testcase_21 AC 131 ms
85,788 KB
testcase_22 AC 132 ms
85,788 KB
testcase_23 AC 129 ms
85,792 KB
testcase_24 AC 131 ms
85,788 KB
testcase_25 AC 129 ms
85,788 KB
testcase_26 AC 130 ms
85,792 KB
testcase_27 AC 131 ms
85,792 KB
testcase_28 AC 130 ms
85,792 KB
testcase_29 AC 129 ms
85,792 KB
testcase_30 AC 135 ms
85,788 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import itertools as iter
import collections as coll
import heapq as hq
import bisect as bis
from decimal import Decimal as dec
from copy import deepcopy as dcopy
import math
import sys
sys.setrecursionlimit(10**6)
def input():
    return sys.stdin.readline().rstrip()
def getN():
	return int(sys.stdin.readline())
def getNs():
	return map(int,sys.stdin.readline().split())
def getList():
	return list(map(int,sys.stdin.readline().split()))
def strinps(n):
	return [sys.stdin.readline().rstrip() for _ in range(n)]
pi = 3.141592653589793
mod = 10**9+7
MOD = 998244353
INF = math.inf
dx = [1,0,-1,0];	dy = [0,1,0,-1]


"""
Main Code
"""

n,m = getNs()
ans = []
while(m):
	p = n // m
	q = n % m
	ans.append(p)
	n = m
	m = q
print(*ans)
0