結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-03-05 14:52:35 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 327 bytes |
| 記録 | |
| コンパイル時間 | 1,865 ms |
| コンパイル使用メモリ | 95,720 KB |
| 実行使用メモリ | 78,976 KB |
| 最終ジャッジ日時 | 2026-08-18 23:14:11 |
| 合計ジャッジ時間 | 4,334 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))