結果
問題 |
No.564 背の順
|
ユーザー |
|
提出日時 | 2022-03-05 14:53:52 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 341 bytes |
コンパイル時間 | 164 ms |
コンパイル使用メモリ | 82,012 KB |
実行使用メモリ | 53,620 KB |
最終ジャッジ日時 | 2024-07-19 19:37:58 |
合計ジャッジ時間 | 1,228 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 2 WA * 7 |
ソースコード
h,n = map(int,input().split()) array = [h] + [int(input()) for i in range(n-1)] array_s = list(sorted(array))[::-1] result = int(str(array_s.index(h)+1)[-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))