結果

問題 No.312 置換処理
ユーザー hkr
提出日時 2017-02-16 13:32:42
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 328 bytes
コンパイル時間 501 ms
コンパイル使用メモリ 59,100 KB
実行使用メモリ 5,248 KB
最終ジャッジ日時 2024-12-30 00:11:22
合計ジャッジ時間 1,957 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 36 WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <cmath>
using namespace std;
typedef long long ll;

int main() {
    ll n;
    cin >> n;
    ll ans = 0;
    for(int i=3;i<sqrt(n);i++) {
        if(n%i==0) {
            ans = i;
            break;
        }
    }
    if(ans == 0)
        cout << n << endl;
    else
        cout << ans << endl;
}
0