結果
問題 |
No.1176 少ない質問
|
ユーザー |
![]() |
提出日時 | 2020-08-21 21:32:30 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 394 bytes |
コンパイル時間 | 1,938 ms |
コンパイル使用メモリ | 88,960 KB |
最終ジャッジ日時 | 2025-01-13 05:16:02 |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <iostream> #include <vector> #include <string> #include <algorithm> #include <cstdio> #include <cstring> #include <cmath> using namespace std; using ll = long long; int main() { ll a; cin >> a; ll r = a; for (int i = 2; i <= 3; i++) { ll t = 1, s = 0; while (t < a) t *= i, s += i; r = min(r, s); } cout << r << endl; return 0; }