結果

問題 No.3362 積分!!!
コンテスト
ユーザー daiota
提出日時 2025-11-17 21:19:44
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 537 bytes
コンパイル時間 1,556 ms
コンパイル使用メモリ 163,152 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-17 21:20:01
合計ジャッジ時間 2,354 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 10 WA * 4
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

typedef long long ll;
typedef pair<ll,ll> P;
#define REP(i,n) for(ll i=0;i<ll(n);i++)








int main(void){
	cin.tie(nullptr);  ios_base::sync_with_stdio(false);
	ll i,j;





	ll N;
	double A,B;
	cin >> N >> A >> B;

	vector<double> a(N+2,1);
	vector<double> b(N+2,1);

	for(i=1;i<=N+1;i++) a[i]=A*a[i-1];
	for(i=1;i<=N+1;i++) b[i]=B*b[i-1];

	double ans=0;
	REP(i,N+1){

		double K;
		cin >> K;

		ans+=1.0*K*(b[i+1]-a[i+1])/(i+1);

	}



	cout << (ll)ans << endl;






	return 0;

}
0