結果

問題 No.2960 Judgement
ユーザー tnakao0123
提出日時 2024-11-18 15:36:40
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 1 ms / 777 ms
コード長 428 bytes
コンパイル時間 596 ms
コンパイル使用メモリ 40,320 KB
最終ジャッジ日時 2025-02-25 05:25:57
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:21:10: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   21 |     scanf("%s", s);
      |     ~~~~~^~~~~~~~~

ソースコード

diff #

/* -*- coding: utf-8 -*-
 *
 * 2960.cc:  No.2960 Judgement - yukicoder
 */

#include<cstdio>
#include<algorithm>

using namespace std;

/* constant */

const int N = 8;

/* main */

int main() {
  int win = 0;
  for (int i = 0; i < N; i++) {
    char s[16];
    scanf("%s", s);
    if (s[0] == 'A' || s[2] == 'O') win++;
  }

  if (win >= 6) puts("Win");
  else if (win == 5) puts("Draw");
  else puts("Lose");
  
  return 0;
}
0