結果

問題 No.192 合成数
ユーザー Yut176Yut176
提出日時 2016-06-06 23:57:04
言語 C++11
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 343 bytes
コンパイル時間 454 ms
コンパイル使用メモリ 61,500 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-27 02:00:41
合計ジャッジ時間 1,523 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

#include<iostream>
#include<algorithm>
#include<stdio.h>
#include<stdlib.h>
#include<vector>
#include<string>
#include<sstream>
using namespace std;


int main(){

  int n;
  cin >> n;

  for(int i=n-100;i<=n+100;i++){
    for(int j=2;j<i;j++){
      if(i%j == 0){
        cout << i << endl;
        return 0;
      }
    }
  }

  return 0;
}
0