結果
問題 |
No.1176 少ない質問
|
ユーザー |
|
提出日時 | 2020-08-29 13:02:10 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 1,000 ms |
コード長 | 370 bytes |
コンパイル時間 | 2,327 ms |
コンパイル使用メモリ | 190,756 KB |
最終ジャッジ日時 | 2025-01-13 20:10:46 |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 |
ソースコード
#include <bits/stdc++.h> using namespace std; using ll = long long; int main(int argc, const char *argv[]) { // ll a; cin >> a; ll ans = a; for (int i = 2; i * i <= a; ++i) { ll cur = i, j = 1; while (cur < a) { cur *= i; j++; } if (i * j < ans) { ans = i * j; } else { break; } } cout << ans << '\n'; }