結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-21 23:18:42 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 594 bytes |
| コンパイル時間 | 1,514 ms |
| コンパイル使用メモリ | 165,076 KB |
| 実行使用メモリ | 13,824 KB |
| 最終ジャッジ日時 | 2024-10-15 06:20:11 |
| 合計ジャッジ時間 | 5,908 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 20 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i=0;i<(int)(n);i++)
using namespace std;
using ll = long long ;
using P = pair<int,int> ;
using pll = pair<long long,long long>;
constexpr int INF = 1e9;
constexpr long long LINF = 1e17;
constexpr int MOD = 1000000007;
constexpr double PI = 3.14159265358979323846;
int main(){
ll a;
scanf("%lld",&a);
ll ans=LINF;
for(ll i=2;i<=min(a,1000000LL);i++){
ll now=1;
ll c=0;
while(now<a){
now*=i;
++c;
}
ans=min(ans,i*c);
}
printf("%lld\n",ans);
return 0;
}