結果
| 問題 |
No.347 微分と積分
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-08-14 23:19:49 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 339 bytes |
| コンパイル時間 | 2,124 ms |
| コンパイル使用メモリ | 191,952 KB |
| 最終ジャッジ日時 | 2025-01-07 11:50:02 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 18 WA * 2 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n,b;
cin>>n>>b;
double a[n];
for (int i=0;i<n;i++) cin>>a[i];
double f=0;
double F=0;
for (int i=0;i<n;i++) {
f+=a[i]*pow(b,a[i]-1);
F+=pow(b,a[i]+1)/(a[i]+1);
}
cout<<f<<endl<<F<<endl;
return 0;
}