結果
| 問題 | No.1063 ルートの計算 / Sqrt Calculation |
| コンテスト | |
| ユーザー |
merom686
|
| 提出日時 | 2020-05-29 21:37:21 |
| 言語 | C++17 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 2,000 ms |
| + 219µs | |
| コード長 | 447 bytes |
| 記録 | |
| コンパイル時間 | 436 ms |
| コンパイル使用メモリ | 106,768 KB |
| 実行使用メモリ | 9,904 KB |
| 最終ジャッジ日時 | 2026-10-12 07:40:37 |
| 合計ジャッジ時間 | 1,572 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 16 |
ソースコード
#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cstdio>
#include <cstring>
#include <cmath>
using namespace std;
using ll = long long;
template <class T>
void chmax(T &a, T b) {
if (b > a) a = b;
}
int main() {
int n;
cin >> n;
int a = 0;
for (int i = 1; i * i <= n; i++) {
if (n % (i * i) == 0) chmax(a, i);
}
cout << a << ' ' << n / (a * a) << endl;
return 0;
}
merom686