結果
問題 |
No.555 世界史のレポート
|
ユーザー |
![]() |
提出日時 | 2017-08-11 22:53:55 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 405 bytes |
コンパイル時間 | 1,642 ms |
コンパイル使用メモリ | 165,680 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-12 21:36:06 |
合計ジャッジ時間 | 2,349 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 4 WA * 16 |
ソースコード
#include "bits/stdc++.h" #define MOD 1000000007 #define INF 11234567890 #define in std::cin #define out std::cout #define rep(i,N) for(int i=0;i<N;++i) typedef long long int LL; int N, C, V; int ans; int main() { in >> N >> C >> V; int cou = 0; auto N_ = N; while (N > 1) { N /= 2; ++cou; } ans = (C + V)*cou + V; ans = std::min(ans, C + V*(N_ - 1)); out << ans << std::endl; return 0; }