結果
| 問題 |
No.88 次はどっちだ
|
| コンテスト | |
| ユーザー |
HiroakiSoftware
|
| 提出日時 | 2014-12-07 21:48:15 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 5,000 ms |
| コード長 | 568 bytes |
| コンパイル時間 | 228 ms |
| コンパイル使用メモリ | 23,040 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-06-11 17:33:56 |
| 合計ジャッジ時間 | 692 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:10:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
10 | scanf("%s", Fast);
| ~~~~~^~~~~~~~~~~~
main.cpp:17:30: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
17 | scanf("%c", &board);
| ~~~~~^~~~~~~~~~~~~~
ソースコード
/*
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;
}
HiroakiSoftware