結果
問題 |
No.1453 手助け
|
ユーザー |
|
提出日時 | 2021-08-25 22:43:36 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 341 bytes |
コンパイル時間 | 1,991 ms |
コンパイル使用メモリ | 190,988 KB |
最終ジャッジ日時 | 2025-01-24 01:51:50 |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
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; else if(d<e) cout<<(b-c)*a*d<<endl; else { int r=(b-c)*a; int x=d, ans=d; rep(i,1,r){ ans+=d; if(i%10==0) d-=e; } cout<<ans<<endl; } }