結果

問題 No.1453 手助け
ユーザー sorag
提出日時 2022-08-03 15:37:29
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 492 bytes
コンパイル時間 648 ms
コンパイル使用メモリ 71,832 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-09-13 08:53:05
合計ジャッジ時間 1,551 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include<string>
#define ll long long
using namespace std;
int main() {
    int a,b,c,d,e,cnt;
    int ans=0;
    cin>>a>>b>>c>>d>>e;
    cnt=(b-c)*a;
    if(cnt==1 or cnt==0) ans=cnt*d;
    else {
        ans+=d;
        for (int i=2;i<=cnt;i++){
            if(i%10!=0) ans+=d;
            else if(i%10==0 and e<=d) ans+=(d-e);
            else if(i%10==0 and e>d) ans+=d;
        }
    }
    cout<<ans<<endl;
   
        return 0;
}


0