結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
fV9TwBhUoa9S3eV
|
| 提出日時 | 2019-09-20 15:27:47 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 98 ms / 2,000 ms |
| コード長 | 338 bytes |
| 記録 | |
| コンパイル時間 | 650 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,360 KB |
| 最終ジャッジ日時 | 2026-04-04 10:38:36 |
| 合計ジャッジ時間 | 2,805 ms |
|
ジャッジサーバーID (参考情報) |
judge5_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
# No.564 背の順
height, n = [int(i) for i in input().split()]
h = [int(input()) for i in range(n - 1)]
h.append(height)
h.sort()
rank = n - h.index(height)
if rank % 10 == 1:
print(str(rank) + 'st')
elif rank % 10 == 2:
print(str(rank) + 'nd')
elif rank % 10 == 3:
print(str(rank) + 'rd')
else:
print(str(rank) + 'th')
fV9TwBhUoa9S3eV