結果
| 問題 | No.1176 少ない質問 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-21 21:31:51 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
WA
不安定
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 797 bytes |
| 記録 | |
| コンパイル時間 | 701 ms |
| コンパイル使用メモリ | 137,640 KB |
| 実行使用メモリ | 9,776 KB |
| 最終ジャッジ日時 | 2026-10-14 23:51:26 |
| 合計ジャッジ時間 | 2,168 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 23 WA * 1 |
ソースコード
//#pragma GCC optimize ("O3")
//#pragma GCC target ("avx")
#include <stdio.h>
#include <iostream>
#include <vector>
#include <algorithm>
#include <map>
#include <queue>
#include <cstdio>
#include <ctime>
#include <assert.h>
#include <chrono>
#include <random>
#include <numeric>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
using namespace std;
typedef long long int ll;
typedef unsigned long long ull;
mt19937_64 rng(chrono::steady_clock::now().time_since_epoch().count());
ll myRand(ll B) {
return (ull)rng() % B;
}
int main(){
cin.tie(nullptr);
ios::sync_with_stdio(false);
ll n; cin >> n;
ll res=n;
for(ll i=2;i<=130;i++){
long double pp=log(n)/log(i);
ll p=(pp+0.9999);
p=max(p,1LL);
res=min(res,i*p);
//cout << p << endl;
}
cout << res << endl;
}