結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-05 14:52:35 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| コンパイル時間 | 1,371 ms |
| コンパイル使用メモリ | 82,284 KB |
| 実行使用メモリ | 54,036 KB |
| 最終ジャッジ日時 | 2024-07-19 19:36:46 |
| 合計ジャッジ時間 | 1,408 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
h,n = map(int,input().split())
array = [h] + [int(input()) for i in range(n-1)]
array_s = list(sorted(array))[::-1]
result = array_s.index(h)+1
if result==1:
print("{}st".format(result))
elif result==2:
print("{}nd".format(result))
elif result==3:
print("{}rd".format(result))
else:
print("{}th".format(result))