結果
| 問題 | No.300 平方数 |
| コンテスト | |
| ユーザー |
kurenai3110
|
| 提出日時 | 2016-07-05 18:40:46 |
| 言語 | C++11 (gcc 15.3.0 + boost 1.92.0) |
| 結果 |
TLE
不安定
|
| 実行時間 | - |
| コード長 | 467 bytes |
| 記録 | |
| コンパイル時間 | 354 ms |
| コンパイル使用メモリ | 88,544 KB |
| 実行使用メモリ | 7,852 KB |
| 最終ジャッジ日時 | 2026-09-15 02:18:46 |
| 合計ジャッジ時間 | 8,775 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 19 TLE * 2 -- * 22 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
int main() {
long long int x,n;
vector<pair<int, int> > ans;
cin >> x;
n = 2;
while (x != 1){
int cnt = 0;
while (!(x%n)){
x = x / n;
cnt++;
}
if (cnt){
ans.push_back(make_pair(cnt, n));
}
n++;
}
long long int y=1;
for (int i = 0; i < ans.size(); i++){
if (ans[i].first % 2){
y *= ans[i].second;
}
}
cout << y << endl;
return 0;
}
kurenai3110