結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2016-08-19 01:15:59 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 427 bytes |
コンパイル時間 | 739 ms |
コンパイル使用メモリ | 76,160 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-07 19:38:17 |
合計ジャッジ時間 | 2,160 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 39 WA * 6 |
ソースコード
#include <iostream> #include <fstream> #include <vector> #include <cstring> #include <string> #include <algorithm> #include <iomanip> using namespace std; typedef long long ll; ll f(ll n) { ll ret = n; for(ll i = 3; i * i <= n; i++) { if(n % i == 0) { ret = min(ret, i); ret = min(ret, n / i); } } return ret; } int main() { cin.tie(0); ios::sync_with_stdio(false); ll N; cin >> N; cout << f(N) << endl; }