結果
| 問題 | 
                            No.347 微分と積分
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-06-25 15:38:25 | 
| 言語 | Python3  (3.13.1 + numpy 2.2.1 + scipy 1.14.1)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 33 ms / 5,000 ms | 
| コード長 | 221 bytes | 
| コンパイル時間 | 144 ms | 
| コンパイル使用メモリ | 12,672 KB | 
| 実行使用メモリ | 10,880 KB | 
| 最終ジャッジ日時 | 2024-07-03 21:33:15 | 
| 合計ジャッジ時間 | 1,614 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
from math import log N = int(input()) B = int(input()) A = tuple(map(float, input().split())) df = sum(B ** (a - 1) * a for a in A) F = sum(B ** (a + 1) / (a + 1) if a != -1.0 else log(B) for a in A) print(df) print(F)