結果

問題 No.88 次はどっちだ
ユーザー sasa
提出日時 2025-03-05 16:59:59
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 13 ms / 5,000 ms
コード長 361 bytes
コンパイル時間 323 ms
コンパイル使用メモリ 28,928 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2025-03-05 17:00:00
合計ジャッジ時間 1,326 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます
コンパイルメッセージ
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", s);
      |         ~~~~~^~~~~~~~~
main.cpp:10:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   10 |                 scanf("%s", str);
      |                 ~~~~~^~~~~~~~~~~

ソースコード

diff #

#include <stdio.h>

int main(){
	char s[10];
	scanf("%s", s);
	char str[10];
	int count = 0;
	for (int i = 0; i < 8; i++)
	{
		scanf("%s", str);
		for (int j = 0; j < 8; j++){
			if (str[j] != '.'){
				count++;
			}
		}
	}
	
	if (count % 2 > 0)
	{
		if (s[0] == 'o'){
			printf("yukiko\n");
		}else{
			printf("oda\n");
		}
	}
	else{
		printf("%s\n", s);
	}
}
0