結果
問題 |
No.312 置換処理
|
ユーザー |
![]() |
提出日時 | 2018-03-02 13:55:11 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 13 ms / 2,000 ms |
コード長 | 798 bytes |
コンパイル時間 | 614 ms |
コンパイル使用メモリ | 78,612 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-11-15 12:18:19 |
合計ジャッジ時間 | 1,939 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 45 |
ソースコード
#include<stdio.h> #include<string.h> #include<stdlib.h> #include<math.h> #include<stack> #include<queue> #include<vector> #include<algorithm> #include<string> #include<iostream> #include<set> #include<map> #include<bitset> using namespace std; typedef long long ll; #define i_7 1000000007 #define i_5 1000000005 ll mod(ll a){ ll c=a%i_7; if(c>=0)return c; else return c+i_7; } typedef pair<int,int> i_i; typedef pair<ll,ll> l_l; #define inf 100000000/*10^8*/ #define rep(i,l,r) for(int i=l;i<=r;i++) const double EPS=1E-8; //////////////////////////////////////// int main(){ ll n;cin>>n; for(int i=3;i<=sqrt(n);i++){ if(n%i==0){ cout<<i;return 0; } } if(n%2==0&&n/2!=2){ cout<<n/2;return 0; } cout<<n; return 0; }