結果
問題 | No.414 衝動 |
ユーザー |
![]() |
提出日時 | 2020-01-31 18:01:15 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 330 bytes |
コンパイル時間 | 1,611 ms |
コンパイル使用メモリ | 165,808 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 09:24:30 |
合計ジャッジ時間 | 2,428 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
#include <bits/stdc++.h> using namespace std; typedef long long ll; ll M; ll solve() { for (ll i = 2; i * i <= M; ++i) { if (M % i == 0) return i; } return -1; } int main() { cin >> M; ll ans = solve(); if (ans == -1LL) cout << 1 << " " << M << endl; else cout << ans << " " << M / ans << endl; return 0; }