結果
問題 |
No.1176 少ない質問
|
ユーザー |
![]() |
提出日時 | 2023-08-27 21:24:24 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 1,000 ms |
コード長 | 606 bytes |
コンパイル時間 | 1,226 ms |
コンパイル使用メモリ | 105,916 KB |
最終ジャッジ日時 | 2025-02-16 15:17:46 |
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#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 < 120; 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; } }