結果
問題 |
No.414 衝動
|
ユーザー |
![]() |
提出日時 | 2016-09-19 19:53:35 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 13 ms / 1,000 ms |
コード長 | 1,182 bytes |
コンパイル時間 | 705 ms |
コンパイル使用メモリ | 89,700 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 09:09:40 |
合計ジャッジ時間 | 1,489 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 13 |
ソースコード
// // main.cpp // No416 // // Created by nanophoto on 2016/09/18. // Copyright © 2016年 nanophoto. All rights reserved. // #include <cmath> #include <vector> #include <map> #include <set> #include <functional> #include <queue> #include <iostream> #include <string> #include <iomanip> #include <algorithm> #include <functional> #include <cstdint> #include <climits> #include <unordered_set> using namespace std; #define ll long long int #define ti4 tuple<int,int,int,int> #define pii pair<int,int> #define REP(x,n) for(int x = 0;x < n;x++) template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){ std::fill( (T*)array, (T*)(array+N), val ); } int main() { ll m; cin >> m; if(m <= 16) { for(int i = 2;i < m;i++) { if(m % i == 0) { cout << i << " " << m / i << endl; return 0; } } cout << "1 " << m << endl; } for(ll i = 2;i < sqrt(m) + 1;i++) { if(m % i == 0) { cout << i << " " << m / i << endl; return 0; } } cout << "1 " << m << endl; return 0; }