結果

問題 No.1063 ルートの計算 / Sqrt Calculation
ユーザー syomusyomu
提出日時 2020-05-29 21:58:42
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 1,508 bytes
コンパイル時間 1,885 ms
コンパイル使用メモリ 165,128 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-23 22:18:56
合計ジャッジ時間 3,099 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
6,816 KB
testcase_01 AC 2 ms
6,816 KB
testcase_02 AC 2 ms
6,940 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,944 KB
testcase_05 AC 2 ms
6,944 KB
testcase_06 AC 2 ms
6,944 KB
testcase_07 AC 2 ms
6,940 KB
testcase_08 AC 2 ms
6,940 KB
testcase_09 AC 2 ms
6,944 KB
testcase_10 AC 2 ms
6,940 KB
testcase_11 AC 2 ms
6,940 KB
testcase_12 AC 2 ms
6,944 KB
testcase_13 AC 2 ms
6,944 KB
testcase_14 AC 2 ms
6,944 KB
testcase_15 AC 2 ms
6,940 KB
testcase_16 AC 2 ms
6,944 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h> //全てのヘッダファイルをインクルード

//ループ
#define REP(i, n) for(int i = 0; i < n; i++) //普通のループ
#define REPR(i, n) for(int i = n; i >= 0; i--) //逆ループ
#define FOR(i, m, n) for(int i = m; i < n; i++) //最初の数値を指定したループ

//型名省略
typedef long long ll;

//配列要素数
static const int MAX = 200000;

using namespace std;

//#include "./lib/generic/sort.h"

std::tuple<int, int> swap(int num1, int num2){
     return std::forward_as_tuple(num1, num2);
}

void traceArray(int A[], int N){
    for(int i=0; i<N; i++){
        cout << A[i];
        if(i!=N-1){
            cout  << " ";
        }
    }
    cout << endl;
}

int push(int A[], int pointer, int tmp){
    A[pointer] = tmp;
    return pointer++;
}

int main(){
    /*int  N;
    cin >> N;
    int  A[N];
    REP(i, N) cin >> A[i];*/
    //sort::Sort test;
    //test.sortByIntention(A, N);
    //test.sortByBubble(A, N);
    //test.sortBySelection(A, N);
    //traceArray(A, N);

     /*int N=200, pointer=0;
     int A[N];
     char tmp;
     while(1){
         cin >> tmp;
         //pointer == push(A, pointer, tmp);
         if(cin.eof()){
            cout << "bbb" << endl;
             break;
         }
     }*/

     ll n;
     cin >> n;

     ll a=2, v1=1;
     while(n>=a*a){
         if(n%(a*a)==0){
             n/=a*a;
             v1*=a;
         }else{
             a++;
         }
     }

     cout << v1 << " " << n;

    return 0;
}
0