結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
👑 ![]() |
提出日時 | 2016-10-17 11:05:40 |
言語 | C90 (gcc 12.3.0) |
結果 |
AC
|
実行時間 | 199 ms / 5,000 ms |
コード長 | 90 bytes |
コンパイル時間 | 80 ms |
コンパイル使用メモリ | 19,584 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-27 00:50:06 |
合計ジャッジ時間 | 3,320 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 4 |
other | AC * 26 |
コンパイルメッセージ
main.c:1:10: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");} | ^~~~ main.c: In function ‘main’: main.c:1:10: warning: type of ‘t’ defaults to ‘int’ [-Wimplicit-int] main.c:1:22: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");} main.c:1:22: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 1 | long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");} | ^~~~~ main.c:1:22: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:69: warning: implicit declaration of function ‘puts’ [-Wimplicit-function-declaration] 1 | long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");} | ^~~~ main.c:1:69: note: include ‘<stdio.h>’ or provide a declaration of ‘puts’
ソースコード
long a,i;main(t){for(scanf("%ld",&a);++i*i<a;)t+=a%(i*i)?a%i<1:2;a=!puts(t>4?"YES":"NO");}