結果
| 問題 | No.347 微分と積分 |
| コンテスト | |
| ユーザー |
lam6er
|
| 提出日時 | 2025-03-20 21:04:02 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 55 ms / 5,000 ms |
| コード長 | 533 bytes |
| 記録 | |
| コンパイル時間 | 223 ms |
| コンパイル使用メモリ | 96,492 KB |
| 実行使用メモリ | 79,444 KB |
| 最終ジャッジ日時 | 2026-07-07 12:42:49 |
| 合計ジャッジ時間 | 3,324 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 20 |
ソースコード
import math
n = int(input())
B = float(input())
a_list = list(map(float, input().split()))
derivative_sum = 0.0
integral_sum = 0.0
for a in a_list:
# Calculate derivative term
derivative_term = a * (B ** (a - 1))
derivative_sum += derivative_term
# Calculate integral term
if a == -1.0:
integral_term = math.log(B)
else:
integral_term = (B ** (a + 1)) / (a + 1)
integral_sum += integral_term
# Output the results with sufficient precision
print(derivative_sum)
print(integral_sum)
lam6er