結果
問題 |
No.1063 ルートの計算 / Sqrt Calculation
|
ユーザー |
|
提出日時 | 2020-05-29 21:30:28 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 390 bytes |
コンパイル時間 | 1,637 ms |
コンパイル使用メモリ | 166,312 KB |
実行使用メモリ | 6,820 KB |
最終ジャッジ日時 | 2024-11-06 02:34:03 |
合計ジャッジ時間 | 2,331 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 9 |
ソースコード
#include <bits/stdc++.h> #define endl '\n' #define ll long long using namespace std; void lok(){ } int main() { ios::sync_with_stdio(0); cin.tie(0); int t; cin>>t; int p=floor(sqrt(t)); if(p*p==t){ cout<<p<<" 1"<<endl; return 0; } while(true){ p--; if(t%(p*p)==0){ cout<<p<<' '<<t/p<<endl; break; } } return 0; }