結果

問題 No.347 微分と積分
ユーザー rlangevinrlangevin
提出日時 2023-01-06 00:27:09
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 273 bytes
コンパイル時間 2,301 ms
コンパイル使用メモリ 86,900 KB
実行使用メモリ 72,124 KB
最終ジャッジ日時 2023-08-19 21:05:40
合計ジャッジ時間 3,700 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
71,688 KB
testcase_01 AC 68 ms
71,520 KB
testcase_02 AC 68 ms
71,668 KB
testcase_03 WA -
testcase_04 AC 68 ms
71,276 KB
testcase_05 AC 67 ms
71,484 KB
testcase_06 AC 67 ms
71,852 KB
testcase_07 AC 68 ms
71,956 KB
testcase_08 WA -
testcase_09 AC 69 ms
71,908 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 67 ms
71,280 KB
testcase_13 AC 68 ms
71,608 KB
testcase_14 WA -
testcase_15 AC 67 ms
71,568 KB
testcase_16 AC 68 ms
71,596 KB
testcase_17 AC 69 ms
71,972 KB
testcase_18 AC 67 ms
71,480 KB
testcase_19 AC 67 ms
71,308 KB
testcase_20 AC 68 ms
71,852 KB
testcase_21 AC 68 ms
71,520 KB
testcase_22 AC 67 ms
71,692 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 round(A[i]) == -1:
        I += log(B)
    else:
        I += B ** (A[i] + 1)/(A[i] + 1)
    
print(D)
print(I)
0