結果

問題 No.564 背の順
コンテスト
ユーザー pluto77
提出日時 2017-09-09 10:30:09
言語 PyPy2
(7.3.20)
結果
WA  
実行時間 -
コード長 354 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 164 ms
コンパイル使用メモリ 77,568 KB
最終ジャッジ日時 2025-12-04 00:38:31
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 3
other WA * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#yuki_564

h,n=map(int,raw_input().split())
l=[h]
for i in xrange(n-1):
 l.append(int(raw_input()))
print l
l2=sorted(l,reverse=True)
print l2
idx=l2.index(h)+1
if idx==11 or idx==12 or idx==13:
 print str(idx)+'th'
elif idx%10==1:
 print str(idx)+'st'
elif idx%10==2:
 print str(idx)+'nd'
elif idx%10==3:
 print str(idx)+'rd'
else:
 print str(idx)+'th'
0