結果
問題 | No.347 微分と積分 |
ユーザー |
![]() |
提出日時 | 2020-08-02 20:39:57 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 30 ms / 5,000 ms |
コード長 | 325 bytes |
コンパイル時間 | 135 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-07-19 07:26:52 |
合計ジャッジ時間 | 1,644 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 20 |
ソースコード
import sys input=lambda: sys.stdin.readline().rstrip() import math n=int(input()) b=int(input()) A=[str(i) for i in input().split()] ans1,ans2=0,0 for a in A: a=int(a.replace(".","")) if a!=0: ans1+=a/10*(b**(a/10-1)) if a!=-10: ans2+=b**(a/10+1)/(a/10+1) else: ans2+=math.log(b) print(ans1) print(ans2)