結果
| 問題 |
No.1176 少ない質問
|
| コンテスト | |
| ユーザー |
akane
|
| 提出日時 | 2020-08-21 21:47:14 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 1,000 ms |
| コード長 | 353 bytes |
| コンパイル時間 | 3,186 ms |
| コンパイル使用メモリ | 192,088 KB |
| 最終ジャッジ日時 | 2025-01-13 05:36:20 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 21 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for (int i=0; i < (n); i++)
using namespace std;
using ll = long long;
int main(){
ios::sync_with_stdio(false);
ll A; cin>>A;
ll ans = 150;
for(ll i=2; i<130; i++){
for(ll j=1; i+j<130; j++){
if(pow(i,j)>=A) ans = min(ans, i*j);
}
}
cout << ans << endl;
}
akane