結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
hir355
|
| 提出日時 | 2020-11-20 22:52:12 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 63 ms / 2,000 ms |
| + 864µs | |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 233 ms |
| コンパイル使用メモリ | 95,592 KB |
| 実行使用メモリ | 78,800 KB |
| 最終ジャッジ日時 | 2026-08-24 02:36:52 |
| 合計ジャッジ時間 | 2,544 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
h, n = map(int, input().split())
a = sorted([int(input()) for _ in range(n - 1)] + [h], reverse=True)
res = a.index(h) + 1
if res % 10 == 1:
print(str(res) + 'st')
elif res % 10 == 2:
print(str(res) + 'nd')
elif res % 10 == 3:
print(str(res) + 'rd')
else:
print(str(res) + 'th')
hir355