結果
| 問題 | No.564 背の順 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-02-27 22:19:35 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 25 ms / 2,000 ms |
| + 640µs | |
| コード長 | 396 bytes |
| 記録 | |
| コンパイル時間 | 225 ms |
| コンパイル使用メモリ | 81,844 KB |
| 実行使用メモリ | 56,744 KB |
| 最終ジャッジ日時 | 2026-10-02 14:17:56 |
| 合計ジャッジ時間 | 2,309 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 9 |
ソースコード
#!/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 str(ind)[-1] == '1':
print('{0}st'.format(ind))
elif str(ind)[-1] == '2':
print('{0}nd'.format(ind))
elif str(ind)[-1] == '3':
print('{0}rd'.format(ind))
else:
print('{0}th'.format(ind))