結果

問題 No.1176 少ない質問
ユーザー merom686
提出日時 2020-08-21 21:25:17
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 402 bytes
コンパイル時間 809 ms
コンパイル使用メモリ 88,996 KB
最終ジャッジ日時 2025-01-13 05:01:00
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;

int main() {
    ll a;
    cin >> a;

    ll r = 1LL << 60;
    for (int i = 2; i <= 3; i++) {
        ll t = 1, s = 0;
        while (t < a) t *= i, s += i;
        r = min(r, s);
    }

    cout << r << endl;

    return 0;
}
0