結果
| 問題 |
No.3362 積分!!!
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-11-17 22:33:47 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 356 bytes |
| コンパイル時間 | 305 ms |
| コンパイル使用メモリ | 12,160 KB |
| 実行使用メモリ | 75,572 KB |
| 最終ジャッジ日時 | 2025-11-17 22:33:55 |
| 合計ジャッジ時間 | 6,764 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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):
xd = int(input())
k.append(xd)
ans,err = integrate.quad(f,a,b)
# 積分近似値の表示
print(int(ans))