結果
| 問題 | 
                            No.1176 少ない質問
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2020-08-21 21:56:38 | 
| 言語 | C++14  (gcc 13.3.0 + boost 1.87.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 518 bytes | 
| コンパイル時間 | 760 ms | 
| コンパイル使用メモリ | 92,192 KB | 
| 実行使用メモリ | 6,824 KB | 
| 最終ジャッジ日時 | 2024-10-15 05:36:49 | 
| 合計ジャッジ時間 | 1,514 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge3 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| other | WA * 21 | 
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <queue>
#include <cmath>
#include <climits>
#include <iomanip>
#include <set>
#include <map>
using namespace std;
typedef long long ll;
int main(){
    ll a;
    cin >> a;
    ll res = pow(10,18);
    for(int i = 1;i <= 60;i++){
        double now = 1 / i;
        double ruto = pow(a,now);
        ll rutoll = (ll)ruto;
        if(ruto != (double)rutoll)rutoll++;
        res = min(res,i * rutoll);
    }
    cout << res << endl;
}