結果

問題 No.1063 ルートの計算 / Sqrt Calculation
ユーザー aki1
提出日時 2020-06-08 05:28:25
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 295 bytes
コンパイル時間 1,467 ms
コンパイル使用メモリ 166,960 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-12-24 04:33:16
合計ジャッジ時間 2,138 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

// Sqrt Calculation
#include <bits/stdc++.h>
using namespace std;

int main(){
    int n, a=1, b;
    cin >> n;
    b = n;
    for(int i=1; i*i<=n; i++){
        if(n%(i*i) == 0){
            a = i;
            b /= (i*i);
        }
    }
    cout << a << " " << n/(a*a) << endl;
    return 0;
}
0