結果
| 問題 | 
                            No.347 微分と積分
                             | 
                    
| コンテスト | |
| ユーザー | 
                            👑  Kazun
                         | 
                    
| 提出日時 | 2020-06-25 23:36:57 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 43 ms / 5,000 ms | 
| コード長 | 229 bytes | 
| コンパイル時間 | 265 ms | 
| コンパイル使用メモリ | 82,596 KB | 
| 実行使用メモリ | 52,608 KB | 
| 最終ジャッジ日時 | 2024-07-03 21:57:25 | 
| 合計ジャッジ時間 | 2,212 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge3 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 20 | 
ソースコード
from math import log
N=int(input())
B=int(input())
A=list(map(float,input().split()))
S=0.0
for a in A:
    S+=a*B**(a-1)
print(S)
T=0
for a in A:
    if a!=-1:
        T+=B**(a+1)/(a+1)
    else:
        T+=log(B)
print(T)
            
            
            
        
            
Kazun