結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
![]() |
提出日時 | 2015-09-01 11:25:56 |
言語 | C90 (gcc 12.3.0) |
結果 |
TLE
|
実行時間 | - |
コード長 | 361 bytes |
コンパイル時間 | 93 ms |
コンパイル使用メモリ | 20,608 KB |
実行使用メモリ | 8,096 KB |
最終ジャッジ日時 | 2024-07-18 17:23:36 |
合計ジャッジ時間 | 12,538 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | -- * 4 |
other | TLE * 1 -- * 25 |
コンパイルメッセージ
main.c: In function ‘main’: main.c:6:5: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result] 6 | scanf("%lld", &N); | ^~~~~~~~~~~~~~~~~
ソースコード
#include <stdio.h> int main(void){ int i, a = 0; long long N; scanf("%lld", &N); if(N<=7){ printf("NO\n"); }else{ for(i=2;i*i<=N;i++){ if(N%i==0){ a++; } } if(a<3){ printf("NO\n"); }else{ printf("YES\n"); } } return 0; }