結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-07-09 14:12:32 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 21 ms / 2,000 ms |
| + 424µs | |
| コード長 | 333 bytes |
| 記録 | |
| コンパイル時間 | 55 ms |
| コンパイル使用メモリ | 14,976 KB |
| 実行使用メモリ | 11,008 KB |
| 最終ジャッジ日時 | 2026-09-11 07:52:56 |
| 合計ジャッジ時間 | 1,809 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
H, N = map(int, input().split())
h = [None] * N
h[0] = H
for i in range(1, N):
h[i] = int(input())
h.sort(reverse=True)
x = h.index(H) + 1
if str(x)[-1] == '1':
print('{}st'.format(x))
elif str(x)[-1] == '2':
print('{}nd'.format(x))
elif str(x)[-1] == '3':
print('{}rd'.format(x))
else:
print('{}th'.format(x))