結果
| 問題 | No.3362 積分!!! |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-17 22:34:38 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 358 bytes |
| 記録 | |
| コンパイル時間 | 303 ms |
| コンパイル使用メモリ | 21,284 KB |
| 実行使用メモリ | 81,024 KB |
| 最終ジャッジ日時 | 2026-07-16 18:19:40 |
| 合計ジャッジ時間 | 7,265 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | TLE * 1 -- * 5 |
| other | -- * 14 |
ソースコード
from scipy import integrate
k = []
# 積分する関数の定義(今回はx^2)
def f(x):
res = 0
base = 1
for c in k:
res += c*base
base *= x
return res
n,a,b = map(int,input().split())
for i in range(n+1):
xd = int(input())
k.append(xd)
ans,err = integrate.quad(f,a,b)
# 積分近似値の表示
print(int(ans))