結果

問題 No.24 数当てゲーム
ユーザー TDTD
提出日時 2022-05-27 16:54:40
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 1,335 bytes
コンパイル時間 733 ms
コンパイル使用メモリ 106,724 KB
実行使用メモリ 24,136 KB
最終ジャッジ日時 2023-10-20 19:45:45
合計ジャッジ時間 1,571 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 23 ms
24,136 KB
testcase_01 WA -
testcase_02 AC 22 ms
24,136 KB
testcase_03 RE -
testcase_04 WA -
testcase_05 RE -
testcase_06 AC 23 ms
24,136 KB
testcase_07 RE -
testcase_08 AC 22 ms
24,136 KB
testcase_09 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;

namespace yukicoder
{
    class Program
    {
        static void Main(string[] args)
        {
            int a = int.Parse(Console.ReadLine());
            int[] n = new int[10];
            int b = 0;
            int ans = 0;
            for (int i = 0; i < a; i++)//入力
            {
                string[] s = Console.ReadLine().Split(' ');

                for (int x = 0; x < a; x++)
                {
                    b = int.Parse(s[x]);

                    for (int z = 0; z < 10; z++)
                    {
                        if (s[4] == "NO")
                        {
                            if (b == z)
                            {
                                n[z] += -1;
                                
                            }
                        }
                        else
                        {
                            n[z] += 1;
                        }
                    }


                }
            }
            for (int s = 0; s < 10; s++)
            {
                for (int t = 0; t < 10; t++)
                {
                    if (n[s] < n[t])
                    {
                        ans = t;
                    }
                }

                
            }
            Console.WriteLine(ans);

        }
        }

    }
0