結果

問題 No.564 背の順
ユーザー NoNo
提出日時 2017-09-08 23:21:16
言語 C#(csc)
(csc 3.9.0)
結果
RE  
実行時間 -
コード長 932 bytes
コンパイル時間 4,252 ms
コンパイル使用メモリ 105,808 KB
実行使用メモリ 22,576 KB
最終ジャッジ日時 2023-08-07 03:11:11
合計ジャッジ時間 4,067 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

using System;

namespace y
{
    class Program
    {
        static void Main(string[] args)
        {
            string[] ss = Console.ReadLine().Split();
            int h = int.Parse(ss[0]);
            int n = int.Parse(ss[1]);
            int a = 1;

            for (int i = 0; i < n; i++)
            {
                int h2 = int.Parse(Console.ReadLine());
                if (h < h2)
                {
                    a++;
                }
            }

            switch (a)
            {
                case 1:
                    Console.WriteLine("1st");
                    break;
                case 2:
                    Console.WriteLine("2nd");
                    break;
                case 3:
                    Console.WriteLine("3rd");
                    break;
                default:
                    Console.WriteLine("{0}th",a);
                    break;
            }
        }
    }
}
0