結果
| 問題 | No.564 背の順 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-07-11 21:28:10 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 42 ms / 2,000 ms | 
| コード長 | 308 bytes | 
| コンパイル時間 | 334 ms | 
| コンパイル使用メモリ | 82,304 KB | 
| 実行使用メモリ | 52,352 KB | 
| 最終ジャッジ日時 | 2024-07-02 03:16:49 | 
| 合計ジャッジ時間 | 1,515 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 9 | 
ソースコード
H, N = map(int, input().split())
Hi = [int(input()) for _ in range(N-1)]
rank = 1
for x in Hi:
    if x > H:
        rank += 1
if rank % 10 == 1:
    print(str(rank) + "st")
elif rank % 10 == 2:
    print(str(rank) + "nd")
elif rank % 10 == 3:
    print(str(rank) + "rd")
else:
    print(str(rank) + "th")
            
            
            
        