結果

問題 No.312 置換処理
ユーザー ku_senjanku_senjan
提出日時 2023-06-04 11:14:40
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 553 ms
コンパイル使用メモリ 66,212 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-29 03:27:13
合計ジャッジ時間 2,085 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 45
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <algorithm>
using namespace std;
int64_t N,ans;
int main(){
  cin >> N;
  ans=N;
  if(N%2==0&&2<N/2)ans=N/2;
  for(int64_t i=3;i*i<=N;i++){
    if(N%i==0)ans=min(ans,i);
  }
  cout<<ans<<endl;
}
0