結果

問題 No.88 次はどっちだ
ユーザー HiroakiSoftwareHiroakiSoftware
提出日時 2014-12-07 21:48:15
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 2 ms / 5,000 ms
コード長 568 bytes
コンパイル時間 196 ms
コンパイル使用メモリ 25,432 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-02 10:54:08
合計ジャッジ時間 975 ms
ジャッジサーバーID
(参考情報)
judge16 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 2 ms
4,376 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 1 ms
4,376 KB
testcase_06 AC 1 ms
4,380 KB
testcase_07 AC 1 ms
4,376 KB
testcase_08 AC 1 ms
4,380 KB
testcase_09 AC 1 ms
4,376 KB
testcase_10 AC 2 ms
4,380 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

/*
yukicoder No.88 次はどっちだ
解答者:ヒロソフ
*/
#include <stdio.h>

int main(void) {
	char Fast[10];
	char Last[10];
	scanf("%s", Fast);
	if (Fast[0] == 'o') sprintf(Last, "yukiko");
	else sprintf(Last, "oda");
	char board;
	int count = -4;
	for (int y = 0; y < 8; y++) {
		for (int x = 0; x < 8; x++) {
			scanf("%c", &board);
			if (board == '\n') {
				x--;
				continue;
			}
			if ((board == 'w') || (board == 'b')) count++;
		}
	}
	if ((count % 2) == 0)printf("%s\n", Fast);
	else printf("%s\n", Last);
	return 0;
}
0