結果
| 問題 | No.239 にゃんぱすー |
| コンテスト | |
| ユーザー |
testestest
|
| 提出日時 | 2016-06-23 19:10:55 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 147 bytes |
| 記録 | |
| コンパイル時間 | 124 ms |
| コンパイル使用メモリ | 29,512 KB |
| 最終ジャッジ日時 | 2026-02-23 21:38:19 |
|
ジャッジサーバーID (参考情報) |
judge3 / 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++]+1-n?s:s?-1:j;j=!printf("%d",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++]+1-n?s:s?-1:j;j=!printf("%d",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++]+1-n?s:s?-1:j;j=!printf("%d",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++]+1-n?s:s?-1:j;j=!printf("%d",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++]+1-n?s:s?-1:j;j=!printf("%d",s?:-1);}
| ~^ ~
| | |
| | int *
| char *
| %ls
main.c:1:77: 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++]+1-n?s:s?-1:j;j=!printf("%d",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++]+1-n?s:s?-1:j;j=!printf("%d",s?:-1);}
testestest