結果

問題 No.564 背の順
ユーザー turner18_jpturner18_jp
提出日時 2017-10-01 16:31:54
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 517 bytes
コンパイル時間 84 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-04-27 17:29:06
合計ジャッジ時間 993 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 WA -
testcase_08 WA -
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

t = input().split()
li = []
li.append(int(t[0]))
for i in range(int(t[1]) - 1):
    li.append(int(input()))
li.sort(reverse=True)
for index, value in enumerate(li, start=1):
    if int(t[0]) == value:
        if index == 1:
            print(str(index) + "st")
            break
        elif index == 2:
            print(str(index) + "nd")
            break
        elif index == 3:
            print(str(index) + "rd")
            break
        else:
            print(str(index) + "th")
            break
print(li)
0