結果
| 問題 |
No.564 背の順
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-27 22:15:56 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| コンパイル時間 | 807 ms |
| コンパイル使用メモリ | 82,176 KB |
| 実行使用メモリ | 52,224 KB |
| 最終ジャッジ日時 | 2024-11-30 11:56:03 |
| 合計ジャッジ時間 | 1,452 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 6 WA * 3 |
ソースコード
#!/usr/bin/env python
hn = [int(x) for x in input().split()]
hlist = [hn[0]]
for i in range(hn[1]-1):
hlist.append(int(input()))
hlist.sort(reverse=True)
ind = hlist.index(hn[0]) + 1
if ind == 1:
print('1st')
elif ind == 2:
print('2nd')
elif ind == 3:
print('3rd')
else:
print('{0}th'.format(ind))