結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
brthyyjp
|
| 提出日時 | 2020-07-06 19:50:58 |
| 言語 | PyPy3 (7.3.23) |
| 結果 |
AC
|
| 実行時間 | 65 ms / 2,000 ms |
| + 688µs | |
| コード長 | 270 bytes |
| 記録 | |
| コンパイル時間 | 703 ms |
| コンパイル使用メモリ | 95,952 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-09-03 09:06:29 |
| 合計ジャッジ時間 | 2,640 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
h, n = map(int, input().split())
H = [int(input()) for i in range(n-1)]
H.sort()
import bisect
i = n-bisect.bisect_left(H, h)
if i%10 == 1:
print(str(i)+'st')
elif i%10 == 2:
print(str(i)+'nd')
elif i%10 == 3:
print(str(i)+'rd')
else:
print(str(i)+'th')
brthyyjp