結果
| 問題 |
No.1453 手助け
|
| コンテスト | |
| ユーザー |
4Bet_Allin
|
| 提出日時 | 2021-05-12 11:04:32 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 996 bytes |
| コンパイル時間 | 865 ms |
| コンパイル使用メモリ | 94,804 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-09-22 16:26:31 |
| 合計ジャッジ時間 | 2,211 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 11 |
ソースコード
#include <iostream> //cin, cout
#include <vector> //vector
#include <algorithm> //sort,min,max,count
#include <string> //string,getline, to_string
#include <ios> //fixed
#include <iomanip> //setprecision
#include <utility> //swap, pair
#include <cstdlib> //abs(int)
#include <cmath> //sqrt,ceil,M_PI, pow, sin
#include <sstream> //stringstream, getline
#include <numeric> //gcd, accumlate
#include <deque> //deque
#include <random> //randam_device
#include <limits> //numeric_limits
using namespace std;
int main(void){
int A, B, C, D, E;
int candy, cost;
cin >> A >> B >> C;
candy = A * (B - C);
// cout << candy;
cin >> D >> E;
cost = D * candy;
if(candy % 10 != 0){
cout << cost;
}
else if(candy % 10 == 0){
if(E <= D){
if (cost - E < 0){
cout << 0;
}
else{
cout << cost - E;
}
}
else{
cout << cost;
}
}
return 0;
}
4Bet_Allin