結果
問題 |
No.36 素数が嫌い!
|
ユーザー |
|
提出日時 | 2016-11-23 21:45:11 |
言語 | C90 (gcc 12.3.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 107 bytes |
コンパイル時間 | 165 ms |
コンパイル使用メモリ | 19,968 KB |
実行使用メモリ | 6,824 KB |
最終ジャッジ日時 | 2024-11-27 10:21:47 |
合計ジャッジ時間 | 1,633 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 3 |
other | AC * 11 WA * 15 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ^ main.c:1:1: warning: type defaults to ‘int’ in declaration of ‘c’ [-Wimplicit-int] main.c:1:3: warning: type defaults to ‘int’ in declaration of ‘i’ [-Wimplicit-int] 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ^ main.c:1:17: warning: return type defaults to ‘int’ [-Wimplicit-int] 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ^~~~ main.c: In function ‘main’: main.c:1:30: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ^~~~~ main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ +++ |+#include <stdio.h> 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} main.c:1:30: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch] 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ^~~~~ main.c:1:30: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:39: warning: format ‘%ld’ expects argument of type ‘long int *’, but argument 2 has type ‘long long int *’ [-Wformat=] 1 | c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");} | ~~^ ~~ | | | | | long
ソースコード
c,i;long long n;main(){for(i=scanf("%ld",&n);i<n/i++;)n%i?:(c++,n/=i--);printf(2<c+!n^1?"YES\n":"NO\n");}