結果

問題 No.312 置換処理
ユーザー femto
提出日時 2016-08-19 01:13:43
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 368 bytes
コンパイル時間 857 ms
コンパイル使用メモリ 76,304 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-11-07 19:38:15
合計ジャッジ時間 2,563 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 39 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <fstream>
#include <vector>
#include <cstring>
#include <string>
#include <algorithm>
#include <iomanip>
using namespace std;
typedef long long ll;

ll f(ll n) {
	for(ll i = 3; i * i <= n; i++) {
		if(n % i == 0) return i;
	}
	return n;
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	ll N;
	cin >> N;
	cout << f(N) << endl;
}
0