結果
| 問題 |
No.36 素数が嫌い!
|
| コンテスト | |
| ユーザー |
focus
|
| 提出日時 | 2018-06-18 01:28:31 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 113 ms / 5,000 ms |
| コード長 | 269 bytes |
| コンパイル時間 | 511 ms |
| コンパイル使用メモリ | 67,084 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-30 16:42:50 |
| 合計ジャッジ時間 | 1,756 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
ソースコード
#include<iostream>
#include<cmath>
using namespace std;
int main() {
long long n,cnt=0;
cin >> n;
for(long long i=2;i<=sqrt(n);i++){
if(n%i==0){
cnt++;
n/=i;
i--;
if(cnt==2){
cout << "YES\n";
return 0;
}
}
}
cout << "NO\n";
return 0;
}
focus