結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
HAGI_TARO
|
| 提出日時 | 2021-09-30 09:57:03 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 374 bytes |
| 記録 | |
| コンパイル時間 | 202 ms |
| コンパイル使用メモリ | 85,504 KB |
| 実行使用メモリ | 52,352 KB |
| 最終ジャッジ日時 | 2026-04-01 04:01:21 |
| 合計ジャッジ時間 | 2,097 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 WA * 1 |
| other | AC * 5 WA * 4 |
ソースコード
h,n = map(int,input().split())
H = [h]
for i in range(n-1):
H.append(int(input()))
H.sort(reverse=True)
if str(H.index(h) + 1)[-1] == "1":
print(str(H.index(h) + 1) + "st")
elif str(H.index(h) + 1)[-1] == "2":
print(str(H.index(h) + 1) + "nd")
elif str(H.index(h) + 1)[-1] == "3":
print(str(H.index(h) + 1) + "rd")
else:
print(str(H.index(h) + 1) + "st")
HAGI_TARO