結果

問題 No.40 多項式の割り算
ユーザー mlihua09
提出日時 2020-09-01 20:56:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 50 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 217 ms
コンパイル使用メモリ 82,304 KB
実行使用メモリ 60,032 KB
最終ジャッジ日時 2024-11-20 16:39:28
合計ジャッジ時間 2,976 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 32
権限があれば一括ダウンロードができます

ソースコード

diff #


D = int(input())

A = list(map(int, input().split()))

a = A[0]

b = sum(A[1::2] + [0])

c = sum(A[2::2] + [0])

if c != 0:
    print(2)
    print(a, b, c)
    
elif b != 0:
    print(1)
    print(a, b)
else:
    print(0)
    print(a)
    
0