結果
| 問題 | No.564 背の順 | 
| コンテスト | |
| ユーザー |  pirorirori_n712 | 
| 提出日時 | 2018-05-30 01:05:54 | 
| 言語 | C#(csc) (csc 3.9.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 28 ms / 2,000 ms | 
| コード長 | 491 bytes | 
| コンパイル時間 | 867 ms | 
| コンパイル使用メモリ | 107,008 KB | 
| 実行使用メモリ | 19,200 KB | 
| 最終ジャッジ日時 | 2024-06-30 08:08:58 | 
| 合計ジャッジ時間 | 1,810 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
コンパイルメッセージ
Microsoft (R) Visual C# Compiler version 3.9.0-6.21124.20 (db94f4cc) Copyright (C) Microsoft Corporation. All rights reserved.
ソースコード
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}");
    }
}
            
            
            
        