結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
Haa
|
| 提出日時 | 2020-08-21 21:33:55 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 465 bytes |
| コンパイル時間 | 1,549 ms |
| コンパイル使用メモリ | 165,712 KB |
| 実行使用メモリ | 13,696 KB |
| 最終ジャッジ日時 | 2024-10-15 05:16:56 |
| 合計ジャッジ時間 | 5,948 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | TLE * 1 -- * 20 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll, ll> P;
typedef vector<ll> VI;
typedef vector<VI> VVI;
const ll MOD = 1000000007;
const ll INF = 1e18;
#define REP(i, n) for(int i = 0; i < n; i++)
#define ALL(v) v.begin(), v.end()
int main(){
ll a; cin >> a;
ll ans=INF;
for(int k=2;k<=3;k++){
int c=0;
double p=1;
for(int i=1;i<a&&p<a;i*=k){
c++;
}
ans=min(ans,(ll)c*k);
}
cout << ans << endl;
return 0;
}
Haa