結果
| 問題 |
No.40 多項式の割り算
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-10-28 17:16:17 |
| 言語 | Python2 (2.7.18) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 305 bytes |
| コンパイル時間 | 253 ms |
| コンパイル使用メモリ | 6,912 KB |
| 実行使用メモリ | 7,040 KB |
| 最終ジャッジ日時 | 2024-11-24 05:12:18 |
| 合計ジャッジ時間 | 2,002 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 3 |
| other | AC * 3 WA * 29 |
ソースコード
D = input()
Ad = raw_input()
A = map(int, Ad.split())[::-1]
if D < 3:
print D
print Ad
exit()
for i in xrange(D-2):
A[i+2] += A[i]
A[i] = 0
if all(a == 0 for a in A):
print 0
else:
A = A[::-1]
while A[-1] == 0:
A.pop()
print ' '.join(map(str, A))