結果

問題 No.564 背の順
ユーザー pirorirori_n712
提出日時 2018-05-30 01:02:54
言語 C#(csc)
(csc 3.9.0)
結果
WA  
実行時間 -
コード長 481 bytes
コンパイル時間 885 ms
コンパイル使用メモリ 112,496 KB
実行使用メモリ 27,440 KB
最終ジャッジ日時 2024-06-30 08:09:10
合計ジャッジ時間 1,817 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1 WA * 2
other AC * 6 WA * 3
権限があれば一括ダウンロードができます
コンパイルメッセージ
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%10; 
        var s=(c>3)?"th":(c==3)?"rd":(c==2)?"nd":"st";
        Console.WriteLine($"{count+1}{s}");
    }
}
0