結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
lumefflux
|
| 提出日時 | 2019-03-18 02:45:10 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 1,000 ms |
| コード長 | 394 bytes |
| コンパイル時間 | 525 ms |
| コンパイル使用メモリ | 63,360 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-08 08:13:33 |
| 合計ジャッジ時間 | 1,854 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 43 |
ソースコード
#include <iostream>
using namespace std;
int main(void){
long long x;
long long y = 1;
cin >> x;
for (long long i = 2; i * i <= x; ++i){
long long cnt = 0;
while(x % i == 0){
x /= i;
cnt++;
}
if (cnt % 2 != 0){
y *= i;
}
}
if(x > 1)
y *= x;
cout << y << endl;
return 0;
}
lumefflux