結果
| 問題 | 
                            No.1453 手助け
                             | 
                    
| コンテスト | |
| ユーザー | 
                             heaveneleven521
                         | 
                    
| 提出日時 | 2021-03-31 21:34:23 | 
| 言語 | C++17  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 379 bytes | 
| コンパイル時間 | 2,765 ms | 
| コンパイル使用メモリ | 191,316 KB | 
| 最終ジャッジ日時 | 2025-01-20 02:58:12 | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 11 WA * 10 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
 
int main() {
    int a,b,c,d,e;
    cin >> a >> b >> c >> d >> e;
    int ans = 0;
    for(int i=0;i<a;i++){
        if(i%10!=9){
        ans+=d;
        }
        else if(i%10==9&&e<=d){
        d=d-e;
        ans+=d;
        }
        else{
        ans+=d;
        }
    }
    cout  << (b-c)*ans << endl;
    
        
    
    }
            
            
            
        
            
heaveneleven521