結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2019-04-28 10:23:12 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 31 ms / 2,000 ms |
コード長 | 295 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,752 KB |
最終ジャッジ日時 | 2024-12-15 02:59:02 |
合計ジャッジ時間 | 1,374 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
H,N = map(int,input().split()) H_list = [int(input()) for x in range(N - 1)] + [H] H_list.sort(reverse=True) num = H_list.index(H) + 1 digit1 = num % 10 tail = "th" if digit1 == 1: tail = "st" elif digit1 == 2: tail = "nd" elif digit1 == 3: tail = "rd" print("{}{}".format(num,tail))