結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
glarand
|
| 提出日時 | 2024-09-30 17:12:05 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 536 bytes |
| コンパイル時間 | 424 ms |
| コンパイル使用メモリ | 82,260 KB |
| 実行使用メモリ | 52,736 KB |
| 最終ジャッジ日時 | 2024-09-30 17:12:08 |
| 合計ジャッジ時間 | 1,484 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
import os
MyPC = os.path.basename(__file__) != "Main.py"
if MyPC:
from icecream import ic
ic.disable()
else:
def ic(*args):
return None
ic.enable() if MyPC else None
def main():
h, n = map(int, input().split())
lh = []
for i in range(n-1):
lh.append(int(input()))
lh.append(h)
lh2 = sorted(lh, reverse=True)
if h == lh2[0]:
print("1st")
elif h == lh2[1]:
print("2nd")
elif h == lh2[2]:
print("3rd")
else:
rank= lh2.index(h)
print(f"{rank+1}th")
if __name__ == "__main__":
main()
glarand