結果
| 問題 |
No.88 次はどっちだ
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-03-17 09:41:26 |
| 言語 | C90 (gcc 12.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 288 bytes |
| コンパイル時間 | 85 ms |
| コンパイル使用メモリ | 21,120 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-04 13:40:26 |
| 合計ジャッジ時間 | 577 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 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++;
}
}
if(w%2==0) printf(c[0] == 'y' ? "yukiko" : "oda");
else printf(c[0] == 'y' ? "oda" : "yukiko");
return 0;
}