結果

問題 No.300 平方数
ユーザー btk
提出日時 2015-11-13 22:29:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 296 bytes
コンパイル時間 1,402 ms
コンパイル使用メモリ 159,252 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-13 14:39:39
合計ジャッジ時間 2,695 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 9 WA * 34
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long LL;
int main() {
    LL X,Y=1;
    cin>>X;
    for(LL i = 2; i*i <= X; i++){
        int mul=0;
        while(X%i==0){
            X/=i;
            mul=1-mul;
        }
        if(mul)Y*=i;
    }
    cout<<Y<<endl;
    return 0;
}
0