結果

問題 No.40 多項式の割り算
ユーザー mlihua09mlihua09
提出日時 2020-09-01 20:56:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 241 bytes
コンパイル時間 681 ms
コンパイル使用メモリ 82,296 KB
実行使用メモリ 61,820 KB
最終ジャッジ日時 2024-04-30 19:08:42
合計ジャッジ時間 2,672 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,872 KB
testcase_01 AC 31 ms
52,680 KB
testcase_02 AC 33 ms
53,856 KB
testcase_03 AC 32 ms
52,124 KB
testcase_04 AC 37 ms
60,104 KB
testcase_05 AC 37 ms
60,432 KB
testcase_06 AC 40 ms
60,608 KB
testcase_07 AC 37 ms
60,936 KB
testcase_08 AC 33 ms
52,668 KB
testcase_09 AC 37 ms
59,904 KB
testcase_10 AC 37 ms
60,804 KB
testcase_11 AC 35 ms
59,776 KB
testcase_12 AC 35 ms
58,676 KB
testcase_13 AC 36 ms
61,820 KB
testcase_14 AC 38 ms
59,288 KB
testcase_15 AC 40 ms
60,896 KB
testcase_16 AC 38 ms
61,276 KB
testcase_17 AC 38 ms
58,488 KB
testcase_18 AC 39 ms
60,600 KB
testcase_19 AC 39 ms
61,156 KB
testcase_20 AC 36 ms
58,900 KB
testcase_21 AC 38 ms
58,928 KB
testcase_22 AC 39 ms
59,116 KB
testcase_23 AC 37 ms
60,004 KB
testcase_24 AC 38 ms
60,460 KB
testcase_25 AC 34 ms
52,560 KB
testcase_26 AC 34 ms
52,500 KB
testcase_27 AC 33 ms
52,708 KB
testcase_28 AC 33 ms
53,164 KB
testcase_29 AC 33 ms
52,740 KB
testcase_30 AC 34 ms
52,548 KB
testcase_31 AC 35 ms
52,280 KB
testcase_32 AC 34 ms
52,060 KB
testcase_33 AC 33 ms
51,880 KB
testcase_34 AC 33 ms
53,372 KB
権限があれば一括ダウンロードができます

ソースコード

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