結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2024-01-01 22:28:40 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 42 ms / 2,000 ms |
コード長 | 279 bytes |
コンパイル時間 | 358 ms |
コンパイル使用メモリ | 82,436 KB |
実行使用メモリ | 53,812 KB |
最終ジャッジ日時 | 2024-09-27 17:34:54 |
合計ジャッジ時間 | 1,550 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 9 |
ソースコード
H, N = map(int, input().split()) L = [H] for i in range(N-1): L.append(int(input())) L.sort(reverse=True) ans = L.index(H) + 1 if ans % 10 == 1: print(str(ans)+"st") elif ans % 10 == 2: print(str(ans)+"nd") elif ans % 10 == 3: print(str(ans)+"rd") else: print(str(ans)+"th")