結果
| 問題 | No.1176 少ない質問 |
| コンテスト | |
| ユーザー |
kpinkcat
|
| 提出日時 | 2023-08-27 21:22:39 |
| 言語 | C++17 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 628 bytes |
| 記録 | |
| コンパイル時間 | 739 ms |
| コンパイル使用メモリ | 122,652 KB |
| 実行使用メモリ | 541,536 KB |
| 最終ジャッジ日時 | 2026-07-02 07:44:04 |
| 合計ジャッジ時間 | 5,872 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 1 -- * 20 |
ソースコード
#include<iostream>
#include<map>
#include<vector>
#include <algorithm>
#include<math.h>
#include <iomanip>
#include<set>
#include <numeric>
#include<string>
using namespace std;
int main()
{
long long a;
cin >> a;
vector<long long> v;
if (a < 7) cout << a << endl;
else if (a <= 9) cout << 6 << endl;
else if (a <= 16) cout << 8 << endl;
else {
for (int i = 3; i <= ceil(pow(a*1., (1/3.0))); i++){
for (int j = 2; j < 60; j++){
if (pow(i, j) >= a) v.push_back(i*j);
}
}
sort(v.begin(), v.end());
cout << v[0] << endl;
}
}
kpinkcat