結果
| 問題 |
No.1063 ルートの計算 / Sqrt Calculation
|
| コンテスト | |
| ユーザー |
IKyopro
|
| 提出日時 | 2020-05-29 22:04:37 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 519 bytes |
| コンパイル時間 | 1,936 ms |
| コンパイル使用メモリ | 192,000 KB |
| 最終ジャッジ日時 | 2025-01-10 17:19:19 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, class U> using Pa = pair<T, U>;
template <class T> using vec = vector<T>;
template <class T> using vvec = vector<vec<T>>;
int main(){
cin.tie(0);
ios::sync_with_stdio(false);
int N;
int a = -1,b = 1e9;
cin >> N;
for(int i=1;i*i<=N;i++){
if(N%(i*i)==0){
if(b>N/(i*i)){
b = N/(i*i);
a = i;
}
}
}
cout << a << " " << b << "\n";
}
IKyopro