結果
| 問題 | No.88 次はどっちだ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-17 09:40:48 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 308 bytes |
| 記録 | |
| コンパイル時間 | 101 ms |
| コンパイル使用メモリ | 21,120 KB |
| 実行使用メモリ | 6,948 KB |
| 最終ジャッジ日時 | 2024-07-04 13:40:21 |
| 合計ジャッジ時間 | 663 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | WA * 11 |
コンパイルメッセージ
main.c: In function ‘main’:
main.c:8:17: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[7]’ [-Wformat=]
8 | scanf("%s",&c);
| ~^ ~~
| | |
| | char (*)[7]
| char *
main.c:11:33: warning: format ‘%s’ expects argument of type ‘char *’, but argument 2 has type ‘char (*)[9]’ [-Wformat=]
11 | scanf("%s",&b);
| ~^ ~~
| | |
| | char (*)[9]
| char *
main.c:8:9: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
8 | scanf("%s",&c);
| ^~~~~~~~~~~~~~
main.c:11:25: warning: ignoring return value of ‘scanf’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
11 | scanf("%s",&b);
| ^~~~~~~~~~~~~~
ソースコード
#include <stdio.h>
int main(void){
int i,j,w=0;
char c[7],b[9];
scanf("%s",&c);
for(i=0;i<8;i++){
scanf("%s",&b);
for(j=0;j<8;j++){
if(b[j]=='.') w++;
}
}
printf("%d\n",w);
if(w%2==0) printf(c[0] == 'y' ? "yukiko" : "oda");
else printf(c[0] == 'y' ? "oda" : "yukiko");
return 0;
}