題目列表
簡單 時間限制:3 s記憶體限制:128 MB

Online Judge - 10268 - 498-bis

來源代碼:UVa
前往提交 ↓

Looking throw the “Online Judge’s Problem Set Archive” I found a very interesting problem number 498, titled “Polly the Polynomial”. Frankly speaking, I did not solve it, but I derived from it this problem. Everything in this problem is a derivative of something from 498. In particular, 498 was “... designed to help you remember ... basic algebra skills, make the world a better place, etc., etc.”. This problem is designed to help you remember basic derivation algebra skills, increase the speed in which world becomes a better place, etc., etc. In 498 you had to evaluate the values of polynomial

a_0x^n + a_1x^{n−1} + . . . + a_{n−1}x + a^n.

In this problem you should evaluate its derivative. Remember that derivative is defined as

a_0nx^{n−1} + a_1(n − 1)x^{n−2} + . . . + a_{n−1}.

All the input and output data will fit into integer, i.e. its absolute value will be less than 2^{31}.

輸入說明

Your program should accept an even number of lines of text. Each pair of lines will represent one problem. The first line will contain one integer - a value for x. The second line will contain a list of integers a_0, a_1, ... , a_{n−1}, a_n, which represent a set of polynomial coefficients.

Input is terminated by EOF.

輸出說明

For each pair of lines, your program should evaluate the derivative of polynomial for the given value x and output it in a single line.

輸入輸出範例

這題目前沒有公開範例。

討論

登入後即可加入討論。 登入

目前還沒有討論文章。

最近提交

hhhhh
C/C++ · 2026-09-25 16:02
AC
hhhhh
C/C++ · 2026-09-25 16:01
WA
hhhhh
C/C++ · 2026-09-25 16:01
CE
123123
Python · 2026-09-22 14:17
AC
123123
Python · 2026-09-22 14:17
CE
123123
Python · 2026-09-22 13:52
RE
Yogurt
C/C++ · 2026-09-10 04:47
AC

登入後即可撰寫程式、測試範例及提交解答。

登入