結果
| 問題 |
No.1517 Party Location
|
| ユーザー |
|
| 提出日時 | 2022-12-16 19:25:58 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 242 bytes |
| コンパイル時間 | 676 ms |
| コンパイル使用メモリ | 53,980 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-11-16 00:21:59 |
| 合計ジャッジ時間 | 1,306 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include <iostream>
using namespace std;
int main()
{
int d, a, b;
cin >> d >> a >> b;
int minv = INT32_MAX;
for (int i = 0; i <= d; i++)
{
minv = min(minv, i * a + (d - i) * b);
}
cout << minv << endl;
}