結果

問題 No.2138 Add Bacon
ユーザー RustiebeatsRustiebeats
提出日時 2022-12-03 23:19:34
言語 C++17(gcc12)
(gcc 12.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 613 bytes
コンパイル時間 2,081 ms
コンパイル使用メモリ 198,768 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-10-11 02:14:35
合計ジャッジ時間 3,033 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#define _DE123BUG
#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
typedef long long ll;
typedef long double ld;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
const long double pi = acos(-1.0);
const int INF = 1987654321;
// const int MOD = 1e9;
////


int main(){
#ifdef _DEBUG
    freopen ("input.txt", "r", stdin);
    freopen("output.txt", "w", stdout);
#endif  
    ios::sync_with_stdio(false);
    cin.tie(NULL);
    
    ll a, b, c, d, e; cin >> a >> b >> c >> d >> e;
    if(d < e) cout << a - b << endl;
    else cout << a-b + c * (d-e) << endl;
                
    return 0;
}   
0