結果
| 問題 | No.36 素数が嫌い! |
| コンテスト | |
| ユーザー |
notetonous
|
| 提出日時 | 2016-06-16 12:10:15 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
AC
|
| 実行時間 | 103 ms / 5,000 ms |
| コード長 | 279 bytes |
| 記録 | |
| コンパイル時間 | 165 ms |
| コンパイル使用メモリ | 29,124 KB |
| 最終ジャッジ日時 | 2026-02-23 21:36:00 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 26 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:5:4: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
5 | scanf("%lld",&N);
| ^~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(){
long long int N;
long long int i,j,count=0;
scanf("%lld",&N);
for(i=2;i*i<=N;i++){
while(N%i==0){
N/=i;
count++;
}
}
if(N>1)count++;
if(count>=3)printf("YES\n");
else printf("NO\n");
return 0;
}
notetonous