結果

問題 No.312 置換処理
ユーザー 0w1
提出日時 2016-11-20 20:52:52
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 342 bytes
コンパイル時間 1,748 ms
コンパイル使用メモリ 165,336 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-15 12:11:17
合計ジャッジ時間 2,879 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 45
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

signed main(){
  ll N; cin >> N;
  ll ans = ( ll ) 1e16;
  for( int i = 1; 1LL *  i * i <= N; ++i )
    if( N % i == 0 ){
      if( i > 2 )
        ans = min( ans, 1LL * i );
      if( N / i > 2 )
        ans = min( ans, N / i );
    }
  cout << ans << endl;
  return 0;
}
0