結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
184
|
| 提出日時 | 2015-11-13 23:10:09 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 401 bytes |
| 記録 | |
| コンパイル時間 | 473 ms |
| コンパイル使用メモリ | 65,152 KB |
| 実行使用メモリ | 13,952 KB |
| 最終ジャッジ日時 | 2026-04-04 06:01:27 |
| 合計ジャッジ時間 | 3,702 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge5_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 1 WA * 2 |
| other | AC * 4 WA * 13 TLE * 1 -- * 25 |
ソースコード
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <vector>
using namespace std;
//namaega184
int main(){
long long x,ans;scanf("%lld",&x);
vector<int> a(1000001);
a[1]=1;
for(int i=2;x!=1;i++){
if(x%i)continue;
while(x%i==0){
a[i]++;
x/=i;
}
}
ans=1;
for(long long i=2;i*i<=x;i++){
if(a[i]&&a[i]%2)ans*=i;
}
printf("%lld\n",ans);
return 0;
}
184