結果
問題 | No.36 素数が嫌い! |
ユーザー | tamakoron |
提出日時 | 2016-11-23 21:45:11 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 107 bytes |
コンパイル時間 | 146 ms |
コンパイル使用メモリ | 20,224 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-05-05 12:49:03 |
合計ジャッジ時間 | 1,638 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 46 ms
5,248 KB |
testcase_01 | AC | 4 ms
5,376 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | AC | 1 ms
5,376 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 1 ms
5,376 KB |
testcase_15 | AC | 1 ms
5,376 KB |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | AC | 8 ms
5,376 KB |
testcase_20 | AC | 6 ms
5,376 KB |
testcase_21 | AC | 23 ms
5,376 KB |
testcase_22 | AC | 4 ms
5,376 KB |
testcase_23 | AC | 2 ms
5,376 KB |
testcase_24 | AC | 25 ms
5,376 KB |
testcase_25 | AC | 33 ms
5,376 KB |
testcase_26 | WA | - |
testcase_27 | WA | - |
testcase_28 | WA | - |
testcase_29 | WA | - |
コンパイルメッセージ
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");}