結果

問題 No.347 微分と積分
ユーザー rin204
提出日時 2022-01-20 03:33:31
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 293 bytes
コンパイル時間 319 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 52,480 KB
最終ジャッジ日時 2024-11-23 14:15:37
合計ジャッジ時間 2,178 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 19 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log

n = int(input())
b = int(input())
A = list(map(float, input().split()))

ans = 0
for a in A:
    if a != 1:
        ans += a * pow(b, a - 1)
print(ans)

ans = 0
for a in A:
    if a != -1:
        ans += pow(b, a + 1) / (a + 1)
    else:
        ans += log(b)

print(ans)
0