結果
問題 |
No.564 背の順
|
ユーザー |
|
提出日時 | 2021-05-07 17:04:24 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 43 ms / 2,000 ms |
コード長 | 312 bytes |
コンパイル時間 | 379 ms |
コンパイル使用メモリ | 82,432 KB |
実行使用メモリ | 52,352 KB |
最終ジャッジ日時 | 2024-09-15 05:25:14 |
合計ジャッジ時間 | 1,486 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
import bisect H,N = map(int,input().split()) H_list = [int(input()) for _ in range(N-1)] H_list.sort() n = N - bisect.bisect(H_list,H) ans = "" if n%10 == 1: ans = str(n)+"st" elif n%10 == 2: ans = str(n)+"nd" elif n%10 == 3: ans = str(n)+"rd" else: ans = str(n)+"th" print(ans)