結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-27 22:15:56 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 321 bytes |
| 記録 | |
| コンパイル時間 | 179 ms |
| コンパイル使用メモリ | 85,572 KB |
| 実行使用メモリ | 54,560 KB |
| 最終ジャッジ日時 | 2026-05-24 03:22:53 |
| 合計ジャッジ時間 | 1,472 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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))