結果
| 問題 | No.347 微分と積分 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-17 21:41:07 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 5,000 ms |
| コード長 | 258 bytes |
| 記録 | |
| コンパイル時間 | 356 ms |
| コンパイル使用メモリ | 85,376 KB |
| 実行使用メモリ | 52,608 KB |
| 最終ジャッジ日時 | 2026-04-18 03:40:02 |
| 合計ジャッジ時間 | 2,186 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
N = int(input())
B = int(input())
a = list(map(float,input().split()))
ans1 = 0
ans2 = 0
from math import log
for i in a:
ans1 += i * pow(B,i-1)
if i != -1:
ans2 += pow(B,i+1) / (i+1)
else:
ans2 += log(B)
print(ans1)
print(ans2)