結果
| 問題 | 
                            No.300 平方数
                             | 
                    
| コンテスト | |
| ユーザー | 
                             hotpepsi
                         | 
                    
| 提出日時 | 2015-12-17 02:01:29 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                TLE
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 298 bytes | 
| コンパイル時間 | 1,049 ms | 
| コンパイル使用メモリ | 54,160 KB | 
| 実行使用メモリ | 13,880 KB | 
| 最終ジャッジ日時 | 2024-09-16 06:52:18 | 
| 合計ジャッジ時間 | 3,552 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge1 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 17 TLE * 1 -- * 25 | 
ソースコード
#include <iostream>
using namespace std;
typedef long long LL;
int main(int argc, char *argv[])
{
	LL x;
	cin >> x;
	LL ans = 1;
	for (LL i = 2; x > 1; ++i) {
		LL cnt = 0;
		while ((x % i) == 0) {
			x /= i;
			++cnt;
		}
		if (cnt % 2) {
			ans *= i;
		}
	}
	cout << ans << endl;
	return 0;
}
            
            
            
        
            
hotpepsi