結果
| 問題 |
No.1063 ルートの計算 / Sqrt Calculation
|
| コンテスト | |
| ユーザー |
zelnyok
|
| 提出日時 | 2020-05-29 21:22:34 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 3 ms / 2,000 ms |
| コード長 | 786 bytes |
| コンパイル時間 | 1,292 ms |
| コンパイル使用メモリ | 118,096 KB |
| 最終ジャッジ日時 | 2025-01-10 16:23:10 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 14 |
ソースコード
#include <iostream>
#include <algorithm>
#include <numeric>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <queue>
#include <deque>
#include <stack>
#include <iomanip>
#include <functional>
#include <bitset>
#include <limits>
#include <cstdio>
#include <cmath>
#include <cassert>
#include <random>
#ifdef DEBUG
#include "library/Utility/debug.cpp"
#else
#define debug(...)
#endif
#define rep(i,n) for(int i=0;i<(n);++i)
#define EL '\n'
#define print(i) std::cout << (i) << '\n'
#define all(v) (v).begin(), (v).end()
using lnt = long long;
constexpr lnt INF = 2e18;
/*-*/
int main() {
lnt n;
std::cin >> n;
lnt ans=1;
lnt ans2=1;
for(lnt x=1;x*x<=n;x++) {
if(n%(x*x)==0) {
ans=n/(x*x);
ans2=x;
}
}
std::cout << ans2 << ' ' << ans << EL;
}
zelnyok