結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2020-08-27 19:31:27 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 891µs | |
| コード長 | 349 bytes |
| 記録 | |
| コンパイル時間 | 1,805 ms |
| コンパイル使用メモリ | 80,880 KB |
| 実行使用メモリ | 56,544 KB |
| 最終ジャッジ日時 | 2026-09-20 23:44:41 |
| 合計ジャッジ時間 | 1,644 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
H, N = map(int, input().split())
from bisect import bisect
h = [int(input()) for i in range(N - 1)]
h.sort()
ans = N - bisect(h, H)
if ans % 10 == 1:
print(ans, 'st', sep='')
elif ans % 10 == 2:
print(ans, 'nd', sep='')
elif ans % 10 == 3:
print(ans, 'rd', sep='')
else:
print(ans, 'th', sep='')