結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
ku_material_ro
|
| 提出日時 | 2016-09-27 09:26:32 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 319 bytes |
| コンパイル時間 | 706 ms |
| コンパイル使用メモリ | 57,948 KB |
| 実行使用メモリ | 10,624 KB |
| 最終ジャッジ日時 | 2024-11-21 07:07:04 |
| 合計ジャッジ時間 | 112,975 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 5 WA * 4 TLE * 17 |
ソースコード
#include<iostream>
#include<string>
#include<math.h>
using namespace std;
int main(){
int n;
int a;
cin >> n;
int judge = 0;
for (int i = 2; i < n; i++){
a = (n / i) * i;
if (a == n){
judge = 1;
break;
}
}
if (judge == 1){
cout << "YES" << endl;
}
else{
cout << "NO" << endl;
}
return 0;
}
ku_material_ro