結果

問題 No.564 背の順
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-05-30 01:05:54
言語 C#(csc)
(csc 3.9.0)
結果
AC  
実行時間 62 ms / 2,000 ms
コード長 491 bytes
コンパイル時間 2,130 ms
コンパイル使用メモリ 105,056 KB
実行使用メモリ 23,932 KB
最終ジャッジ日時 2023-09-12 20:32:45
合計ジャッジ時間 3,572 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 61 ms
23,916 KB
testcase_01 AC 61 ms
21,872 KB
testcase_02 AC 60 ms
21,960 KB
testcase_03 AC 61 ms
21,820 KB
testcase_04 AC 61 ms
22,052 KB
testcase_05 AC 62 ms
21,952 KB
testcase_06 AC 62 ms
23,848 KB
testcase_07 AC 61 ms
23,932 KB
testcase_08 AC 62 ms
21,880 KB
testcase_09 AC 62 ms
23,912 KB
testcase_10 AC 62 ms
23,856 KB
testcase_11 AC 61 ms
19,820 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc)
Copyright (C) Microsoft Corporation. All rights reserved.

ソースコード

diff #

using System;
using System.Linq;

class No564{
    static void Main(string[] args){
        string[] str=(Console.ReadLine()).Split(' ');
        int[] i=str.Select(t=>Int32.Parse(t)).ToArray();
        var num=i[1]-1;
        var count=0;
        for(int j=0;j<num;++j){
            if((i[0]-(Int32.Parse(Console.ReadLine())))<0) count++;
        }
        var c=(count+1)%10; 
        var s=(c>3||c==0)?"th":(c==3)?"rd":(c==2)?"nd":"st";
        Console.WriteLine($"{count+1}{s}");
    }
}
0