結果

問題 No.347 微分と積分
ユーザー yuppe19 😺yuppe19 😺
提出日時 2016-03-04 11:20:48
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 29 ms / 5,000 ms
コード長 339 bytes
コンパイル時間 220 ms
コンパイル使用メモリ 11,988 KB
実行使用メモリ 10,300 KB
最終ジャッジ日時 2023-10-24 19:45:26
合計ジャッジ時間 1,549 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
10,300 KB
testcase_01 AC 27 ms
10,300 KB
testcase_02 AC 27 ms
10,300 KB
testcase_03 AC 29 ms
10,248 KB
testcase_04 AC 29 ms
10,220 KB
testcase_05 AC 28 ms
10,220 KB
testcase_06 AC 27 ms
10,300 KB
testcase_07 AC 26 ms
10,300 KB
testcase_08 AC 27 ms
10,248 KB
testcase_09 AC 27 ms
10,300 KB
testcase_10 AC 28 ms
10,300 KB
testcase_11 AC 28 ms
10,300 KB
testcase_12 AC 28 ms
10,220 KB
testcase_13 AC 27 ms
10,248 KB
testcase_14 AC 27 ms
10,300 KB
testcase_15 AC 27 ms
10,248 KB
testcase_16 AC 29 ms
10,248 KB
testcase_17 AC 27 ms
10,300 KB
testcase_18 AC 27 ms
10,300 KB
testcase_19 AC 27 ms
10,220 KB
testcase_20 AC 27 ms
10,300 KB
testcase_21 AC 27 ms
10,300 KB
testcase_22 AC 27 ms
10,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/python3
# -*- coding: utf-8 -*-
# †
from math import log

eps = 1e-9
dnya = lambda arr: sum(a * b**(a-1) for a in arr)
inya = lambda arr: sum(log(b) if abs(a+1)<eps else b**(a+1)/(a+1) for a in arr)

n = int(input())
b = int(input())
a = list(map(float, input().split()))
res1, res2 = dnya(a), inya(a)
print(res1)
print(res2)
0