結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-05-20 00:51:42 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 144 bytes |
| 記録 | |
| コンパイル時間 | 218 ms |
| コンパイル使用メモリ | 29,768 KB |
| 最終ジャッジ日時 | 2026-02-23 21:19:09 |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 2 |
| other | AC * 16 WA * 17 |
コンパイルメッセージ
main.c:1:1: warning: data definition has no type or storage class
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
| ^
main.c:1:5: warning: data definition has no type or storage class
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
| ^
main.c: In function ‘main’:
main.c:1:29: warning: incompatible implicit declaration of built-in function ‘scanf’ [-Wbuiltin-declaration-mismatch]
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
| ^~~~~
main.c:1:1: note: include ‘<stdio.h>’ or provide a declaration of ‘scanf’
+++ |+#include <stdio.h>
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
main.c:1:53: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
| ~^ ~
| | |
| | int *
| char *
| %ls
main.c:1:76: warning: passing argument 1 of ‘strcmp’ from incompatible pointer type [-Wincompatible-pointer-types]
1 | x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
|
ソースコード
x[];a[99],i,j,s;main(n){for(scanf("%d",&n);~scanf("%s",x);a[i++%n]+=strcmp(x,"nyanpass"));for(;j<99;)s=~a[j++]?s:s?-1:j;j=!printf("%d",s?s:-1);}
testestest