結果

問題 No.564 背の順
ユーザー reforefo2reforefo2
提出日時 2020-05-09 19:15:06
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 18 ms / 2,000 ms
コード長 333 bytes
コンパイル時間 95 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,900 KB
最終ジャッジ日時 2023-09-20 08:13:40
合計ジャッジ時間 1,108 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,752 KB
testcase_01 AC 17 ms
7,892 KB
testcase_02 AC 18 ms
7,816 KB
testcase_03 AC 17 ms
7,856 KB
testcase_04 AC 16 ms
7,820 KB
testcase_05 AC 16 ms
7,792 KB
testcase_06 AC 16 ms
7,796 KB
testcase_07 AC 16 ms
7,800 KB
testcase_08 AC 17 ms
7,820 KB
testcase_09 AC 16 ms
7,900 KB
testcase_10 AC 16 ms
7,852 KB
testcase_11 AC 16 ms
7,800 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

H, N = map(int,input().split())
List = [H]
for i in range(N-1):
    List.append(int(input()))
List.sort(reverse = True)
Num = List.index(H) + 1
Nums = str(Num)
if Nums[-1] == "1":
    Nums = Nums + "st"
elif Nums[-1] == "2":
    Nums = Nums + "nd"
elif Nums[-1] == "3":
    Nums = Nums + "rd"
else:
    Nums = Nums + "th"
print(Nums)
0