結果

問題 No.347 微分と積分
ユーザー 👑 KazunKazun
提出日時 2020-06-25 23:36:57
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 77 ms / 5,000 ms
コード長 229 bytes
コンパイル時間 283 ms
コンパイル使用メモリ 87,332 KB
実行使用メモリ 72,116 KB
最終ジャッジ日時 2023-09-16 23:11:09
合計ジャッジ時間 3,066 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,772 KB
testcase_01 AC 75 ms
71,944 KB
testcase_02 AC 77 ms
71,800 KB
testcase_03 AC 74 ms
71,572 KB
testcase_04 AC 74 ms
71,648 KB
testcase_05 AC 73 ms
71,592 KB
testcase_06 AC 73 ms
71,836 KB
testcase_07 AC 76 ms
71,696 KB
testcase_08 AC 75 ms
72,116 KB
testcase_09 AC 75 ms
71,736 KB
testcase_10 AC 75 ms
71,684 KB
testcase_11 AC 75 ms
71,904 KB
testcase_12 AC 77 ms
71,144 KB
testcase_13 AC 74 ms
71,676 KB
testcase_14 AC 76 ms
71,812 KB
testcase_15 AC 75 ms
71,896 KB
testcase_16 AC 75 ms
71,776 KB
testcase_17 AC 74 ms
71,704 KB
testcase_18 AC 76 ms
71,580 KB
testcase_19 AC 75 ms
71,688 KB
testcase_20 AC 76 ms
71,840 KB
testcase_21 AC 74 ms
71,792 KB
testcase_22 AC 75 ms
71,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import log

N=int(input())
B=int(input())
A=list(map(float,input().split()))

S=0.0
for a in A:
    S+=a*B**(a-1)

print(S)

T=0
for a in A:
    if a!=-1:
        T+=B**(a+1)/(a+1)
    else:
        T+=log(B)

print(T)
0