結果
問題 | No.312 置換処理 |
ユーザー |
|
提出日時 | 2018-06-08 14:20:41 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 263 bytes |
コンパイル時間 | 555 ms |
コンパイル使用メモリ | 64,296 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-30 10:39:18 |
合計ジャッジ時間 | 1,802 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 44 WA * 1 |
ソースコード
#include <iostream> using namespace std; typedef long long LL; using namespace std; int main(int argc, char* argv[]) { LL N; cin>>N; LL i; for (i=3;i*i<=N;i++){ if (N%i==0){ cout<<i<<endl; return 0; } } i=N%2==0?N/2:N; cout<<i<<endl; return 0; }