結果

問題 No.347 微分と積分
ユーザー 💕💖💞
提出日時 2018-08-10 21:44:48
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 33 ms / 5,000 ms
コード長 295 bytes
コンパイル時間 148 ms
コンパイル使用メモリ 12,416 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-09-23 05:56:25
合計ジャッジ時間 1,724 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
b = int(input())

xs = [float(x) for x in input().split()]
import math
f1 = [(x)*math.pow(b, x-1) for x in xs]
def integral(x):
  try:
    return math.pow(b, x+1)/(x+1)
  except Exception as ex:
    return math.log(b)
f2 = [integral(x) for x in xs]
print(sum(f1))
print(sum(f2))
0