結果
| 問題 | 
                            No.1453 手助け
                             | 
                    
| コンテスト | |
| ユーザー | 
                             Yotaro HOKUGO
                         | 
                    
| 提出日時 | 2021-04-01 00:03:26 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 325 bytes | 
| コンパイル時間 | 1,818 ms | 
| コンパイル使用メモリ | 166,024 KB | 
| 実行使用メモリ | 5,248 KB | 
| 最終ジャッジ日時 | 2024-12-15 23:13:50 | 
| 合計ジャッジ時間 | 2,714 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 10 WA * 11 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,b,c,d,e;
    cin>>a>>b>>c>>d>>e;
    long 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;
}
            
            
            
        
            
Yotaro HOKUGO