結果
| 問題 | No.1517 Party Location |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-12-16 19:25:58 |
| 言語 | C++11(old_compat) (gcc 12.4.0 + boost 1.89.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 242 bytes |
| 記録 | |
| コンパイル時間 | 1,312 ms |
| コンパイル使用メモリ | 165,104 KB |
| 実行使用メモリ | 7,844 KB |
| 最終ジャッジ日時 | 2026-03-08 16:32:16 |
| 合計ジャッジ時間 | 1,874 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}