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