結果

問題 No.1453 手助け
ユーザー Yotaro HOKUGOYotaro HOKUGO
提出日時 2021-04-01 00:11:02
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 316 bytes
コンパイル時間 1,869 ms
コンパイル使用メモリ 166,652 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-15 23:23:43
合計ジャッジ時間 2,626 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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=0,p=d;
    for(int i=1;i<=b-c;i++){
        if(i%10!=0) ans+=p;
        if(i%10==0&&e<=p){
            ans+=p-e;
            p=p-e;
        }
        if(i%10==0&&e>p) ans+=p;
    }
    cout<<ans<<endl;
}
0