結果

問題 No.564 背の順
ユーザー Takayuki HirotaTakayuki Hirota
提出日時 2021-02-02 12:50:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 75 ms / 2,000 ms
コード長 211 bytes
コンパイル時間 278 ms
コンパイル使用メモリ 87,108 KB
実行使用メモリ 71,524 KB
最終ジャッジ日時 2023-09-12 11:03:25
合計ジャッジ時間 1,923 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,524 KB
testcase_01 AC 71 ms
71,500 KB
testcase_02 AC 72 ms
71,352 KB
testcase_03 AC 72 ms
71,500 KB
testcase_04 AC 75 ms
71,444 KB
testcase_05 AC 72 ms
71,444 KB
testcase_06 AC 72 ms
71,340 KB
testcase_07 AC 71 ms
71,448 KB
testcase_08 AC 73 ms
71,508 KB
testcase_09 AC 70 ms
71,296 KB
testcase_10 AC 70 ms
71,072 KB
testcase_11 AC 71 ms
71,324 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m,n=map(int,input().split())
f=lambda:int(input())
h=[f() for i in range(n-1)]
h+=[m]

srt=sorted(h)[::-1]
r=srt.index(m)+1
bi='st' if r%10==1 else 'nd' if r%10==2 else 'rd' if r%10==3 else 'th'
print(str(r)+bi)
0