結果

問題 No.300 平方数
ユーザー eve__fuyuki
提出日時 2018-03-14 02:54:01
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 654 ms
コンパイル使用メモリ 54,428 KB
実行使用メモリ 13,768 KB
最終ジャッジ日時 2024-11-24 16:58:53
合計ジャッジ時間 34,015 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 17 TLE * 16
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
using namespace std;
int main(){
    long long X;
    cin >> X;
    long long ans = 1;
    int count;
    for(int i=2;i*i<=X;i++){
        count = 0;
        while(X%i == 0){
            count ++;
            X /= i;
        }
        if(count%2 == 1) ans *= i;
    }
    cout << ans << endl;
    return 0;
}
0