結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
wata_python
|
| 提出日時 | 2019-08-16 00:10:53 |
| 言語 | Python3 (3.14.3 + numpy 2.4.4 + scipy 1.17.1) |
| 結果 |
AC
|
| 実行時間 | 95 ms / 2,000 ms |
| コード長 | 290 bytes |
| 記録 | |
| コンパイル時間 | 625 ms |
| コンパイル使用メモリ | 20,828 KB |
| 実行使用メモリ | 15,484 KB |
| 最終ジャッジ日時 | 2026-04-08 03:04:54 |
| 合計ジャッジ時間 | 2,637 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
h,n= map(int, input().split())
l=[h]
for i in range(n-1):
l.append(int(input()))
l=sorted(l, reverse=1)
rank = l.index(h)+1
one = rank%10
if one==1:
print(str(rank)+"st")
elif one==2:
print(str(rank)+"nd")
elif one==3:
print(str(rank)+"rd")
else:
print(str(rank)+"th")
wata_python