結果
| 問題 | No.201 yukicoderじゃんけん |
| コンテスト | |
| ユーザー |
yasosigu
|
| 提出日時 | 2015-05-07 07:10:31 |
| 言語 | C90(gcc12) (gcc 12.4.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 187 bytes |
| 記録 | |
| コンパイル時間 | 130 ms |
| コンパイル使用メモリ | 28,356 KB |
| 最終ジャッジ日時 | 2026-02-23 18:20:55 |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 3 WA * 15 RE * 2 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:6:9: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int *’ [-Wformat=]
6 | scanf("%s %d %c\n%s %d %c" ,&a,&b,&c,&d,&e,&f);
| ~^ ~~
| | |
| char * int *
| %ls
main.c:6:15: warning: format ‘%c’ expects argument of type ‘char *’, but argument 4 has type ‘int *’ [-Wformat=]
6 | scanf("%s %d %c\n%s %d %c" ,&a,&b,&c,&d,&e,&f);
| ~^ ~~
| | |
| char * int *
| %lc
main.c:6:19: warning: format ‘%s’ expects argument of type ‘char *’, but argument 5 has type ‘int *’ [-Wformat=]
6 | scanf("%s %d %c\n%s %d %c" ,&a,&b,&c,&d,&e,&f);
| ~^ ~~
| | |
| char * int *
| %ls
main.c:6:25: warning: format ‘%c’ expects argument of type ‘char *’, but argument 7 has type ‘int *’ [-Wformat=]
6 | scanf("%s %d %c\n%s %d %c" ,&a,&b,&c,&d,&e,&f);
| ~^ ~~
| | |
| char * int *
| %lc
main.c:9:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
9 | printf("%s" ,a);
| ~^ ~
| | |
| | int
| char *
| %d
main.c:15:10: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘int’ [-Wformat=]
15 | printf("%s" ,d);
| ~^ ~
| | |
| | int
| char *
| %d
main.c:6:1: warning: ignoring return value of
ソースコード
#include<stdio.h>
int main()
{
int a,b,c,d,e,f;
scanf("%s %d %c\n%s %d %c" ,&a,&b,&c,&d,&e,&f);
if(b>e)
printf("%s" ,a);
else if(b=e)
printf("-1");
else
printf("%s" ,d);
return 0;
}
yasosigu