結果

問題 No.347 微分と積分
ユーザー fumofumofunifumofumofuni
提出日時 2021-09-14 15:00:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 5,000 ms
コード長 278 bytes
コンパイル時間 374 ms
コンパイル使用メモリ 81,968 KB
実行使用メモリ 52,608 KB
最終ジャッジ日時 2024-06-27 05:08:24
合計ジャッジ時間 2,024 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

import math
N=int(input())
B=float(input())
A=list(map(float,input().split()))
res=0.0
for i in range(N):
    res+=pow(B,A[i]-1)*A[i]
print(res)
res=0.0
for i in range(N):
    if abs(A[i]+1)<0.01:
        res+=math.log(B)
    else:
        res+=pow(B,A[i]+1)/(A[i]+1)
print(res)
0