結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
hir355
|
| 提出日時 | 2020-11-20 22:52:12 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
AC
|
| 実行時間 | 40 ms / 2,000 ms |
| コード長 | 295 bytes |
| 記録 | |
| コンパイル時間 | 328 ms |
| コンパイル使用メモリ | 85,120 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-04-03 14:33:13 |
| 合計ジャッジ時間 | 1,463 ms |
|
ジャッジサーバーID (参考情報) |
judge5_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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