結果

問題 No.347 微分と積分
ユーザー ああいいああいい
提出日時 2022-03-17 21:41:07
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 34 ms / 5,000 ms
コード長 258 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 82,288 KB
実行使用メモリ 53,956 KB
最終ジャッジ日時 2024-04-09 20:22:20
合計ジャッジ時間 1,854 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
52,268 KB
testcase_01 AC 32 ms
53,580 KB
testcase_02 AC 34 ms
52,288 KB
testcase_03 AC 33 ms
53,728 KB
testcase_04 AC 33 ms
52,948 KB
testcase_05 AC 33 ms
52,752 KB
testcase_06 AC 32 ms
53,444 KB
testcase_07 AC 32 ms
52,712 KB
testcase_08 AC 32 ms
53,456 KB
testcase_09 AC 32 ms
52,648 KB
testcase_10 AC 32 ms
52,384 KB
testcase_11 AC 31 ms
53,556 KB
testcase_12 AC 33 ms
53,132 KB
testcase_13 AC 31 ms
53,584 KB
testcase_14 AC 31 ms
52,980 KB
testcase_15 AC 31 ms
52,320 KB
testcase_16 AC 31 ms
52,724 KB
testcase_17 AC 31 ms
53,824 KB
testcase_18 AC 32 ms
53,248 KB
testcase_19 AC 31 ms
52,868 KB
testcase_20 AC 30 ms
53,420 KB
testcase_21 AC 30 ms
53,240 KB
testcase_22 AC 30 ms
53,956 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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)
0