結果

問題 No.564 背の順
ユーザー notsix4notsix4
提出日時 2021-12-06 21:05:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 239 bytes
コンパイル時間 97 ms
コンパイル使用メモリ 10,616 KB
実行使用メモリ 7,944 KB
最終ジャッジ日時 2023-09-21 15:46:08
合計ジャッジ時間 1,047 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

p,n=map(int,input().split())
l=[int(input()) for x in range(n-1)]
l.append(p)
nl=sorted(l,reverse=True)
a=str(nl.index(p)+1)
if a=="1":
    print(a+"st")
elif a=="2":
    print(a+"nd")
elif a=="3":
    print(a+"rd")
else:
    print(a+"th")
0