結果
| 問題 |
No.1517 Party Location
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-09-04 16:53:54 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 26 ms / 2,000 ms |
| コード長 | 232 bytes |
| コンパイル時間 | 1,943 ms |
| コンパイル使用メモリ | 191,804 KB |
| 最終ジャッジ日時 | 2025-01-24 07:58:15 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
#define rep(i,l,r) for(int i=(l);i<(r);++i)
typedef long long ll;
int main(){
int d,a,b; cin>>d>>a>>b;
int mn=100000001;
rep(i,0,d+1){
mn=min(mn,i*a+(d-i)*b);
}
cout<<mn<<endl;
}