結果

問題 No.564 背の順
ユーザー OhnumaOhnuma
提出日時 2020-04-09 13:40:38
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 399 bytes
コンパイル時間 859 ms
コンパイル使用メモリ 10,524 KB
実行使用メモリ 7,912 KB
最終ジャッジ日時 2023-10-11 07:10:34
合計ジャッジ時間 2,454 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,828 KB
testcase_01 WA -
testcase_02 AC 16 ms
7,832 KB
testcase_03 WA -
testcase_04 AC 17 ms
7,912 KB
testcase_05 AC 16 ms
7,792 KB
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 AC 16 ms
7,864 KB
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

h,n = map(int,input().split())
H = [int(input()) for _ in range(n-1)]
H.append(h)
H.sort(reverse=True)
for i in range(n):
    if H[i]==h:
        if str(i)[-1]==0:
            print('{}st'.format(i+1))
        elif str(i)[-1]==1:
            print('{}nd'.format(i+1))
        elif str(i)[-1]==2:
            print('{}rd'.format(i+1))
        else:
            print('{}th'.format(i+1))
        break
0