結果

問題 No.564 背の順
ユーザー pirorirori_n712pirorirori_n712
提出日時 2018-05-30 01:00:43
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 469 bytes
コンパイル時間 2,425 ms
コンパイル使用メモリ 104,336 KB
実行使用メモリ 25,988 KB
最終ジャッジ日時 2023-09-12 20:32:53
合計ジャッジ時間 3,660 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 62 ms
24,032 KB
testcase_01 AC 62 ms
21,872 KB
testcase_02 AC 61 ms
21,896 KB
testcase_03 WA -
testcase_04 AC 62 ms
21,868 KB
testcase_05 AC 62 ms
21,944 KB
testcase_06 AC 61 ms
21,888 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 AC 62 ms
21,860 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 s=(count>3)?"th":(count==3)?"rd":(count==2)?"nd":"st";
        Console.WriteLine($"{count+1}{s}");
    }
}
0