結果

問題 No.347 微分と積分
コンテスト
ユーザー JunOnuma
提出日時 2017-06-22 18:44:16
言語 PyPy2
(7.3.15)
結果
AC  
実行時間 95 ms / 5,000 ms
コード長 252 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 211 ms
コンパイル使用メモリ 77,496 KB
最終ジャッジ日時 2025-12-04 00:15:31
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import math
n = int(raw_input())
b = int(raw_input())
l = map(float, raw_input().split())
x = 0.0
y = 0.0
for f in l:
    x += (b ** (f-1)) * f
    if f == -1.0:
        y += math.log(abs(b))
    else:
        y += (b ** (f+1)) / (f+1)
print x
print y
0