結果

問題 No.1453 手助け
ユーザー heaveneleven521
提出日時 2021-03-31 21:15:34
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 383 bytes
コンパイル時間 1,566 ms
コンパイル使用メモリ 166,588 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-15 13:52:57
合計ジャッジ時間 2,412 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 2 WA * 19
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int a,b,c,d,e;
    cin >> a >> b >> c >> d >> e;
    int ans = d;
    for(int i=2;i<=a;i++){
        if(i%10!=0){
        ans+=d;
        }
        else if(i%10==0&&e<=d){
        ans+=d;
        ans-=e;
        }
        else{
        ans+=d;
        }
    }
    cout  << a*(b-c)*ans << endl;
    
        
    
    }
0