結果
問題 |
No.1517 Party Location
|
ユーザー |
|
提出日時 | 2021-05-28 22:56:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 230 bytes |
コンパイル時間 | 2,094 ms |
コンパイル使用メモリ | 192,992 KB |
最終ジャッジ日時 | 2025-01-21 20:16:38 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { int d, a, b; cin >> d >> a >> b; int ans = 1 << 30; for(int x=0;x<=d;x++) { ans = min(ans, x * a + (d - x) * b); } cout << ans << endl; }