結果

問題 No.40 多項式の割り算
ユーザー 双六双六
提出日時 2020-07-22 13:35:33
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 619 bytes
コンパイル時間 717 ms
コンパイル使用メモリ 87,328 KB
実行使用メモリ 77,700 KB
最終ジャッジ日時 2023-09-02 10:47:23
合計ジャッジ時間 5,857 ms
ジャッジサーバーID
(参考情報)
judge13 / judge16
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 AC 90 ms
71,428 KB
testcase_02 AC 91 ms
71,632 KB
testcase_03 AC 90 ms
71,632 KB
testcase_04 AC 99 ms
77,192 KB
testcase_05 AC 99 ms
77,336 KB
testcase_06 AC 101 ms
77,432 KB
testcase_07 AC 98 ms
77,112 KB
testcase_08 AC 90 ms
71,664 KB
testcase_09 AC 95 ms
77,328 KB
testcase_10 AC 95 ms
77,408 KB
testcase_11 AC 94 ms
77,200 KB
testcase_12 AC 96 ms
77,240 KB
testcase_13 AC 97 ms
77,164 KB
testcase_14 AC 95 ms
77,200 KB
testcase_15 AC 98 ms
77,196 KB
testcase_16 AC 98 ms
77,320 KB
testcase_17 AC 99 ms
77,168 KB
testcase_18 AC 100 ms
77,220 KB
testcase_19 AC 98 ms
77,116 KB
testcase_20 AC 99 ms
77,268 KB
testcase_21 AC 96 ms
77,152 KB
testcase_22 AC 98 ms
77,184 KB
testcase_23 AC 100 ms
77,216 KB
testcase_24 AC 97 ms
77,700 KB
testcase_25 AC 91 ms
71,492 KB
testcase_26 WA -
testcase_27 AC 95 ms
71,632 KB
testcase_28 WA -
testcase_29 AC 93 ms
71,760 KB
testcase_30 AC 93 ms
71,804 KB
testcase_31 AC 90 ms
71,880 KB
testcase_32 WA -
testcase_33 AC 89 ms
71,500 KB
testcase_34 AC 93 ms
71,816 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

#処理内容
def main():
	D = int(input())
	A = getlist()
	if D <= 3:
		print(*A)
		return

	for i in range(D - 2):
		a = A[-1 - i]
		A[-1 - i] = 0
		A[-3 - i] += a

	# print(A)
	if A[2] == 0:
		if A[1] == 0:
			if A[0] == 0:
				print(0)
				print(0)
			else:
				print(0)
				print(A[0])
		else:
			print(1)
			print(A[0], A[1])
	else:
		print(2)
		print(A[0], A[1], A[2])



if __name__ == '__main__':
	main()
0