結果

問題 No.3362 積分!!!
コンテスト
ユーザー hirakuuuu
提出日時 2025-11-17 21:29:36
言語 C++23
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 794 bytes
コンパイル時間 3,048 ms
コンパイル使用メモリ 276,344 KB
実行使用メモリ 7,848 KB
最終ジャッジ日時 2025-11-17 21:29:46
合計ジャッジ時間 3,679 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 6
other AC * 8 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
// #include <atcoder/all>
using namespace std;
// using namespace atcoder;
#define rep(i, a, n) for(int i = a; i < n; i++)
#define rrep(i, a, n) for(int i = a; i >= n; i--)
#define inr(l, x, r) (l <= x && x < r)
#define ll long long
#define ld long double

// using mint = modint1000000007;
// using mint = modint998244353;
constexpr int IINF = 1001001001;
constexpr ll INF = 1e18;

template<class t,class u> void chmax(t&a,u b){if(a<b)a=b;}
template<class t,class u> void chmin(t&a,u b){if(b<a)a=b;}

int main(){
    ll n, a, b; cin >> n >> a >> b;
    ll I = 0;
    ll A = 1, B = 1;
    rep(i, 0, n+1){
        ll k; cin >> k;
        A *= a;
        B *= b;
        I += (long double)k*(B-A)/(long double)(i+1);
    }

    cout << (ll)I << endl;
    
    return 0;
}
0