結果
| 問題 | No.1176 少ない質問 |
| コンテスト | |
| ユーザー |
Haa
|
| 提出日時 | 2020-08-21 21:33:55 |
| 言語 | C++14 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 465 bytes |
| 記録 | |
| コンパイル時間 | 1,508 ms |
| コンパイル使用メモリ | 179,904 KB |
| 実行使用メモリ | 16,384 KB |
| 最終ジャッジ日時 | 2026-05-03 02:09:20 |
| 合計ジャッジ時間 | 6,402 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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