結果
問題 |
No.300 平方数
|
ユーザー |
![]() |
提出日時 | 2015-11-14 10:09:25 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 302 bytes |
コンパイル時間 | 1,455 ms |
コンパイル使用メモリ | 158,536 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-09-13 16:42:03 |
合計ジャッジ時間 | 2,589 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 WA * 34 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(void){ ll x; cin >> x; ll ans = 1; for(ll i=2; i < sqrt(x); i++){ ll cnt = 0; while(x%i == 0){ x /= i; cnt++; } if(cnt%2 == 1){ ans *= i; } } cout << ans << endl; return 0; }