結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-21 23:48:24 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 443 bytes |
| コンパイル時間 | 791 ms |
| コンパイル使用メモリ | 65,780 KB |
| 最終ジャッジ日時 | 2025-01-13 06:37:22 |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 1 WA * 20 |
ソースコード
#include <iostream>
using lint = long long;
void solve() {
lint x;
std::cin >> x;
lint ans = 70;
for (lint n = 2; n <= x && n <= ans; ++n) {
lint m = 1, y = n;
while (y < x) {
++m;
y *= n;
}
ans = std::min(ans, n * m);
}
std::cout << ans << "\n";
}
int main() {
std::cin.tie(nullptr);
std::ios::sync_with_stdio(false);
solve();
return 0;
}