結果

問題 No.564 背の順
ユーザー HagianHagian
提出日時 2021-06-19 08:26:51
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 301 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,808 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-05 00:41:57
合計ジャッジ時間 1,137 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

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