結果

問題 No.347 微分と積分
ユーザー rlangevinrlangevin
提出日時 2023-01-06 00:41:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 5,000 ms
コード長 263 bytes
コンパイル時間 775 ms
コンパイル使用メモリ 87,024 KB
実行使用メモリ 71,700 KB
最終ジャッジ日時 2023-08-19 21:17:31
合計ジャッジ時間 3,970 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,528 KB
testcase_01 AC 68 ms
71,528 KB
testcase_02 AC 68 ms
71,504 KB
testcase_03 AC 67 ms
71,668 KB
testcase_04 AC 66 ms
71,212 KB
testcase_05 AC 69 ms
71,256 KB
testcase_06 AC 71 ms
71,612 KB
testcase_07 AC 69 ms
71,616 KB
testcase_08 AC 70 ms
71,564 KB
testcase_09 AC 70 ms
71,700 KB
testcase_10 AC 69 ms
71,516 KB
testcase_11 AC 69 ms
71,524 KB
testcase_12 AC 69 ms
70,960 KB
testcase_13 AC 69 ms
71,636 KB
testcase_14 AC 68 ms
71,500 KB
testcase_15 AC 69 ms
71,384 KB
testcase_16 AC 69 ms
71,664 KB
testcase_17 AC 68 ms
71,588 KB
testcase_18 AC 67 ms
71,532 KB
testcase_19 AC 67 ms
71,172 KB
testcase_20 AC 67 ms
71,516 KB
testcase_21 AC 67 ms
71,536 KB
testcase_22 AC 67 ms
71,652 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import *
N = int(input())
B = int(input())
A = list(map(float, input().split()))
D, I = 0, 0
for i in range(N):
    D += A[i] * B ** (A[i] - 1)
    if A[i] == -1.0:
        I += log(B)
    else:
        I += B ** (A[i] + 1)/(A[i] + 1)

print(D)
print(I)
0