結果
問題 |
No.1176 少ない質問
|
ユーザー |
![]() |
提出日時 | 2020-08-31 07:22:59 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 418 bytes |
コンパイル時間 | 2,341 ms |
コンパイル使用メモリ | 190,908 KB |
最終ジャッジ日時 | 2025-01-14 02:17:20 |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 20 WA * 1 |
ソースコード
#include <bits/stdc++.h> using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int64_t A; cin >> A; auto f = [](int64_t a, int b) { int res = 0; while (a > 0) { a /= b; res++; } return res; }; int bmax = f(A, 2); int res = 1 << 28; for (int i = 2; i < bmax + 1; i++) { res = min(res, i * f(A, i)); } cout << res << '\n'; return 0; }