結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2021-09-30 09:57:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 41 ms / 2,000 ms |
コード長 | 374 bytes |
コンパイル時間 | 170 ms |
コンパイル使用メモリ | 82,356 KB |
実行使用メモリ | 53,916 KB |
最終ジャッジ日時 | 2024-07-17 13:14:57 |
合計ジャッジ時間 | 1,181 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
h,n = map(int,input().split()) H = [h] for i in range(n-1): H.append(int(input())) H.sort(reverse=True) if str(H.index(h) + 1)[-1] == "1": print(str(H.index(h) + 1) + "st") elif str(H.index(h) + 1)[-1] == "2": print(str(H.index(h) + 1) + "nd") elif str(H.index(h) + 1)[-1] == "3": print(str(H.index(h) + 1) + "rd") else: print(str(H.index(h) + 1) + "th")