結果
| 問題 |
No.300 平方数
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-02-18 15:26:20 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 317 bytes |
| コンパイル時間 | 658 ms |
| コンパイル使用メモリ | 53,972 KB |
| 実行使用メモリ | 10,496 KB |
| 最終ジャッジ日時 | 2024-12-30 04:08:51 |
| 合計ジャッジ時間 | 33,978 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 10 WA * 17 TLE * 16 |
ソースコード
#include <iostream>
using namespace std;
typedef long long ll;
int main() {
ll x, ans = 1;
cin >> x;
for(int i=2;i * i <= x;i++) {
int cnt = 0;
while(x % i == 0) {
x /= i;
cnt++;
}
if(cnt % 2)
ans *= i;
}
cout << ans << endl;
}