問題一覧 > 通常問題

No.3362 Integral!!!

レベル : / AI推定難易度 : 625 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 58
作問者 : IT2006 / テスター : noya2 jupiter_68 Koi
お気に入りにしたユーザー ProblemId : 12808 / 自分の提出
問題文最終更新日: 2025-11-17 17:24:17
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 作問ハッカソンコンテスト 003 Day2 (順位表) の他の問題:

Problem Statement

You are given a non-negative integer $N$ and a sequence $K_0,K_1,K_2,\dots,K_N$.

This represents the following polynomial function of $x$.

$f(x)=K_0x^0+K_1x^1+K_2x^2+\dots +K_ix^i+\dots +K_Nx^N$

You are given integers $A,B\ (A\le B)$. Let $X$ be the value of the definite integral of $f(x)$ over the interval $[A,B]$. Output $\lfloor X\rfloor$.

Constraints

  • $N,A,B,K_i$ are all integers
  • $0 \le N \le 10$
  • $-10 \le A \le B \le 10$
  • $-10^5 \le K_i \le 10^5\ (0\le i\le N)$

Input

$N$ $A$ $B$
$K_0$
$K_1$
$K_2$
$\vdots$
$K_N$

Output

Output $\lfloor X\rfloor$ as an integer.

Sample

Sample 1
Input
2 0 1
1
2
1
Output
2

The definite integral of $x^2+2x+1$ over $[0,1]$ is $7/3=2.3333\dots$.
Since $\lfloor 2.3333\dots \rfloor=2$, output $2$.

Sample 2
Input
5 -1 1
0
0
0
0
0
1
Output
0

Sample 3
Input
0 0 1
9999
Output
9999

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。