結果
問題 | No.1063 ルートの計算 / Sqrt Calculation |
ユーザー |
![]() |
提出日時 | 2020-05-29 21:25:49 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 3 ms / 2,000 ms |
コード長 | 270 bytes |
コンパイル時間 | 1,509 ms |
コンパイル使用メモリ | 166,656 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 02:24:54 |
合計ジャッジ時間 | 2,145 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 14 |
コンパイルメッセージ
main.cpp: In function 'int main()': main.cpp:12:29: warning: 'a' may be used uninitialized [-Wmaybe-uninitialized] 12 | cout << a << " " << n/a/a << endl; | ^ main.cpp:8:9: note: 'a' was declared here 8 | int a; | ^
ソースコード
#include <bits/stdc++.h>#define REP(i, n) for(int i = 0; (i) < (n); (i)++)using namespace std;int main(){int n; cin >> n;int a;for(int i=1; i*i<=n; i++){if(n%(i*i)==0) a = i;}cout << a << " " << n/a/a << endl;return 0;}