結果

問題 No.1453 手助け
ユーザー Yotaro HOKUGO
提出日時 2021-04-01 00:05:33
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 324 bytes
コンパイル時間 1,655 ms
コンパイル使用メモリ 167,360 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-15 23:19:19
合計ジャッジ時間 2,579 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

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