結果

問題 No.36 素数が嫌い!
コンテスト
ユーザー DialBird
提出日時 2016-11-20 09:42:34
言語 C++11
(gcc 15.3.0 + boost 1.92.0)
コンパイル:
g++-15 -O2 -lm -std=gnu++11 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
TLE  
実行時間 -
コード長 258 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 271 ms
コンパイル使用メモリ 73,600 KB
実行使用メモリ 9,868 KB
最終ジャッジ日時 2026-09-30 16:59:23
合計ジャッジ時間 17,674 ms
ジャッジサーバーID
(参考情報)
judge1_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample -- * 4
other TLE * 1 -- * 25
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <iostream>

using namespace std;

#define REP(i,fast,last) for(int i=fast;i<last;i++)

long N;

int main(){
  string result = "NO";
  cin >> N;
  if (N != 1) {
    REP(i,2,N/2+1){
      if (N%i == 0) result = "YES";
    }
  }
  cout<<result<<endl;
}
0