結果
問題 | No.1176 少ない質問 |
ユーザー |
![]() |
提出日時 | 2020-12-07 14:49:22 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 362 bytes |
コンパイル時間 | 1,617 ms |
コンパイル使用メモリ | 165,784 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-09-17 13:54:26 |
合計ジャッジ時間 | 1,887 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h>using namespace std;int main(){long long A;cin >> A;long long ans = 0;long long mul = 1;long long n = 0;while( mul < A ) {mul *= 2;n++;}ans = n * 2;for( long long i = 3; i <= ans; i++ ) {mul = 1;n = 0;while( mul < A ) {mul *= i;n++;}ans = min( ans, n * i );}cout << ans << endl;}