結果
| 問題 | No.1063 ルートの計算 / Sqrt Calculation |
| コンテスト | |
| ユーザー |
tnakao0123
|
| 提出日時 | 2020-06-02 11:15:48 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.89.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 787 bytes |
| 記録 | |
| コンパイル時間 | 751 ms |
| コンパイル使用メモリ | 93,568 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-11-23 18:23:56 |
| 合計ジャッジ時間 | 1,592 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 7 WA * 7 |
ソースコード
/* -*- coding: utf-8 -*-
*
* 1063.cc: No.1063 ルートの計算 / Sqrt Calculation - yukicoder
*/
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<stack>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
using namespace std;
/* constant */
/* typedef */
/* global variables */
/* subroutines */
/* main */
int main() {
int n;
scanf("%d", &n);
for (int b = 1; b * b <= n; b++)
if (n % b == 0) {
int aa = n / b;
int a = sqrt(0.5 + aa);
if (a * a == aa) {
printf("%d %d\n", a, b);
return 0;
}
}
printf("1 %d\n", n);
return 0;
}
tnakao0123