結果
| 問題 |
No.1517 Party Location
|
| コンテスト | |
| ユーザー |
sorag
|
| 提出日時 | 2022-07-31 14:46:13 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 285 bytes |
| コンパイル時間 | 601 ms |
| コンパイル使用メモリ | 69,480 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-20 22:41:02 |
| 合計ジャッジ時間 | 1,219 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#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++) {
e = d * b;
c = i * a + (d - i) * b;
e = min(e, c);
}
cout << e << endl;
return 0;
}
sorag