結果

問題 No.88 次はどっちだ
ユーザー toto
提出日時 2025-03-27 17:59:09
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 348 bytes
コンパイル時間 339 ms
コンパイル使用メモリ 27,648 KB
実行使用メモリ 7,328 KB
最終ジャッジ日時 2025-03-27 17:59:10
合計ジャッジ時間 1,305 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 1 WA * 10
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:5:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
    5 |         scanf("%s",str);
      |         ~~~~~^~~~~~~~~~
main.cpp:11:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   11 |                         scanf("%s",tmp);
      |                         ~~~~~^~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
	char str[10];
	scanf("%s",str);
	
	int count = 0;
	for(int i = 0;i < 8;i ++){
		char tmp[8];
		for(int j = 0;j < 8;j ++){
			scanf("%s",tmp);
			if(tmp[j] == 'b'){
				count++;
			}
		}
	}
	if(count % 2 == 0){
		printf("%s",str);
	}else{
		if(str[0] == 'y'){
			printf("oda");
		}else{
			printf("yukiko");
		}
	}
}
0