結果
| 問題 |
No.414 衝動
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-09-27 22:40:07 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 12 ms / 1,000 ms |
| コード長 | 526 bytes |
| コンパイル時間 | 1,985 ms |
| コンパイル使用メモリ | 198,968 KB |
| 最終ジャッジ日時 | 2025-02-07 17:34:55 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 13 |
ソースコード
#include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (n); i++)
using namespace std;
typedef long long ll;
int main(){
cin.tie(0);
ios::sync_with_stdio(0);
ll M; cin >> M;
set<pair<ll,ll>> st;
for(ll i = 2; i * i <= M; i++) {
if(M % i == 0) {
st.insert({i, M / i});
st.insert({M / i, i});
}
}
if(st.size() == 0u) {
cout << 1 << " " << M << endl;
} else {
auto [x, y] = *st.begin();
cout << x << " " << y << endl;
}
}