結果
問題 | No.239 にゃんぱすー |
ユーザー | testestest |
提出日時 | 2015-08-09 14:12:43 |
言語 | C90 (gcc 11.4.0) |
結果 |
WA
(最新)
AC
(最初)
|
実行時間 | - |
コード長 | 187 bytes |
コンパイル時間 | 158 ms |
コンパイル使用メモリ | 24,104 KB |
実行使用メモリ | 4,384 KB |
最終ジャッジ日時 | 2023-09-25 07:27:54 |
合計ジャッジ時間 | 1,804 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge15 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 1 ms
4,376 KB |
testcase_01 | AC | 0 ms
4,376 KB |
testcase_02 | AC | 1 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,380 KB |
testcase_04 | AC | 0 ms
4,376 KB |
testcase_05 | WA | - |
testcase_06 | AC | 0 ms
4,380 KB |
testcase_07 | AC | 1 ms
4,376 KB |
testcase_08 | AC | 1 ms
4,380 KB |
testcase_09 | WA | - |
testcase_10 | AC | 1 ms
4,376 KB |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | AC | 1 ms
4,376 KB |
testcase_14 | WA | - |
testcase_15 | WA | - |
testcase_16 | WA | - |
testcase_17 | WA | - |
testcase_18 | WA | - |
testcase_19 | WA | - |
testcase_20 | AC | 1 ms
4,380 KB |
testcase_21 | WA | - |
testcase_22 | AC | 1 ms
4,376 KB |
testcase_23 | AC | 2 ms
4,376 KB |
testcase_24 | AC | 2 ms
4,380 KB |
testcase_25 | WA | - |
testcase_26 | WA | - |
testcase_27 | AC | 1 ms
4,376 KB |
testcase_28 | AC | 0 ms
4,376 KB |
testcase_29 | WA | - |
testcase_30 | AC | 1 ms
4,380 KB |
testcase_31 | AC | 1 ms
4,380 KB |
testcase_32 | WA | - |
testcase_33 | WA | - |
testcase_34 | AC | 1 ms
4,376 KB |
testcase_35 | WA | - |
testcase_36 | AC | 3 ms
4,380 KB |
コンパイルメッセージ
main.c: In function ‘main’: main.c:4:1: warning: implicit declaration of function ‘scanf’ [-Wimplicit-function-declaration] scanf("%d",&n); ^~~~~ main.c:4:1: warning: incompatible implicit declaration of built-in function ‘scanf’ main.c:4:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’ main.c:1:1: +#include <stdio.h> int main(){ main.c:4:1: scanf("%d",&n); ^~~~~ main.c:5:33: warning: implicit declaration of function ‘strcmp’ [-Wimplicit-function-declaration] while(~scanf("%s",x))a[i++%n]+=!strcmp(x,"nyanpass"); ^~~~~~ main.c:7:1: warning: implicit declaration of function ‘printf’ [-Wimplicit-function-declaration] printf("%d",s?s:-1); ^~~~~~ main.c:7:1: warning: incompatible implicit declaration of built-in function ‘printf’ main.c:7:1: note: include ‘<stdio.h>’ or provide a declaration of ‘printf’
ソースコード
int main(){ int a[100]={},i,n,s=0; char x[31]; scanf("%d",&n); while(~scanf("%s",x))a[i++%n]+=!strcmp(x,"nyanpass"); for(i=0;i<100;)s=a[i++]+1-n?s:s?-1:i; printf("%d",s?s:-1); return 0; }