結果
問題 | No.347 微分と積分 |
ユーザー | rlangevin |
提出日時 | 2023-01-06 00:41:14 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 39 ms / 5,000 ms |
コード長 | 263 bytes |
コンパイル時間 | 159 ms |
コンパイル使用メモリ | 82,340 KB |
実行使用メモリ | 53,748 KB |
最終ジャッジ日時 | 2024-11-29 17:08:56 |
合計ジャッジ時間 | 1,924 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
from math import * N = int(input()) B = int(input()) A = list(map(float, input().split())) D, I = 0, 0 for i in range(N): D += A[i] * B ** (A[i] - 1) if A[i] == -1.0: I += log(B) else: I += B ** (A[i] + 1)/(A[i] + 1) print(D) print(I)