結果
問題 | No.1517 Party Location |
ユーザー | sorag |
提出日時 | 2022-07-31 14:44:46 |
言語 | C++14 (gcc 12.3.0 + boost 1.83.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 280 bytes |
コンパイル時間 | 453 ms |
コンパイル使用メモリ | 68,876 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-28 04:07:53 |
合計ジャッジ時間 | 1,753 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | WA | - |
testcase_04 | AC | 1 ms
4,376 KB |
testcase_05 | AC | 2 ms
4,376 KB |
testcase_06 | WA | - |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | WA | - |
testcase_09 | AC | 2 ms
4,380 KB |
testcase_10 | AC | 1 ms
4,380 KB |
testcase_11 | WA | - |
testcase_12 | AC | 2 ms
4,376 KB |
testcase_13 | AC | 2 ms
4,376 KB |
testcase_14 | AC | 1 ms
4,376 KB |
ソースコード
#include<iostream> #include<string> #include<vector> #include<algorithm> using namespace std; int main() { int a, b, c, d; int e=0; cin >> d; cin >> a >> b; for (int i = 0; i <=d; i++) { c = i * a + (d - i) * b; e = c; e = min(e, c); } cout << e << endl; return 0; }