結果

問題 No.312 置換処理
ユーザー omu
提出日時 2015-12-07 13:53:46
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 428 bytes
コンパイル時間 587 ms
コンパイル使用メモリ 70,032 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-09-14 18:19:10
合計ジャッジ時間 1,889 ms
ジャッジサーバーID
(参考情報)
judge4 / judge6
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 44 WA * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <vector>
#include <iostream>
#include <string>
#include <sstream>
#include <algorithm>
#include <utility>
#include <map>
#include <cmath>

using namespace std;
typedef long long ll;
typedef pair<ll,ll> P;

int main(){
	ll n;
	cin >> n;
	for(ll i = 3;i * i <= n;i++){
		if(n % i == 0){
			cout << i << endl;
			return 0;
		}
	}
	for(ll i = 2;i >= 1;i--){
		if(n % i == 0){
			cout << n / i << endl;
			return 0;
		}
	}
}
0