結果
| 問題 |
No.347 微分と積分
|
| コンテスト | |
| ユーザー |
JunOnuma
|
| 提出日時 | 2017-06-22 18:44:16 |
| 言語 | Python2 (2.7.18) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 5,000 ms |
| コード長 | 252 bytes |
| コンパイル時間 | 54 ms |
| コンパイル使用メモリ | 7,040 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-02 12:20:09 |
| 合計ジャッジ時間 | 1,139 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
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
JunOnuma