結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
nmnmnmnmnmnmnm
|
| 提出日時 | 2014-10-08 00:41:44 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 385 bytes |
| コンパイル時間 | 542 ms |
| コンパイル使用メモリ | 61,664 KB |
| 実行使用メモリ | 5,248 KB |
| 最終ジャッジ日時 | 2024-12-30 07:51:38 |
| 合計ジャッジ時間 | 1,796 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 17 WA * 9 |
ソースコード
#include <algorithm>
#include <iostream>
#include <string.h>
#include <math.h>
using namespace std;
int main(){
long long n;
cin>>n;
if(n==1){
cout << "NO" << endl;
return 0;
}
long long d = sqrt(n);
for(int i = 2; i <= d; i++){
if(n%i==0){
cout << "YES" << endl;
return 0;
}
}
cout << "NO" << endl;
return 0;
}
nmnmnmnmnmnmnm