結果

問題 No.312 置換処理
ユーザー ohreitetsu
提出日時 2018-06-08 14:19:28
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 309 bytes
コンパイル時間 481 ms
コンパイル使用メモリ 64,904 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-30 10:39:23
合計ジャッジ時間 1,702 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
typedef long long LL;
using namespace std;
int main(int argc, char* argv[])
{
	LL N;
	cin>>N;
	if (N%3==0){
		cout<<3<<endl;
		return 0;
	}
	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;
}
0