結果
| 問題 |
No.1453 手助け
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-08-25 22:32:00 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 351 bytes |
| コンパイル時間 | 1,959 ms |
| コンパイル使用メモリ | 192,212 KB |
| 最終ジャッジ日時 | 2025-01-24 01:51:39 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 11 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<(r);++i)
typedef long long ll;
int main(){
int a,b,c,d,e; cin>>a>>b>>c>>d>>e;
if(b-c==0) {cout<<0<<endl; return 0;}
int r=(b-c)*a;
int x=d, ans=d;
rep(i,2,r+1){
if(i%10!=0) ans+=x;
if(i%10==0&&e<=x) ans+=(x-e);
if(i%10==0&&e>x) ans+=x;
}
cout<<ans<<endl;
}