結果

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

ソースコード

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<=a-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;
    }
}
0