結果

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

ソースコード

diff #

#include <iostream>
#include <math.h>
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 n=sqrt((double)N);
	LL i;
	for (i=3;i<=n;i++){
		if (N%i==0){
			cout<<i<<endl;
			return 0;
		}
	}
	cout<<N<<endl;
	return 0;
}
0