結果
問題 | No.564 背の順 |
ユーザー | daku9640 |
提出日時 | 2018-03-19 00:19:07 |
言語 | Python3 (3.12.2 + numpy 1.26.4 + scipy 1.12.0) |
結果 |
RE
|
実行時間 | - |
コード長 | 205 bytes |
コンパイル時間 | 157 ms |
コンパイル使用メモリ | 10,696 KB |
実行使用メモリ | 7,952 KB |
最終ジャッジ日時 | 2023-08-28 21:18:50 |
合計ジャッジ時間 | 1,775 ms |
ジャッジサーバーID (参考情報) |
judge13 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 16 ms
7,936 KB |
testcase_01 | AC | 16 ms
7,848 KB |
testcase_02 | AC | 16 ms
7,812 KB |
testcase_03 | RE | - |
testcase_04 | AC | 15 ms
7,904 KB |
testcase_05 | AC | 16 ms
7,868 KB |
testcase_06 | AC | 16 ms
7,824 KB |
testcase_07 | RE | - |
testcase_08 | RE | - |
testcase_09 | AC | 16 ms
7,868 KB |
testcase_10 | AC | 16 ms
7,804 KB |
testcase_11 | AC | 16 ms
7,820 KB |
ソースコード
m = {1:"st", 2:"nd", 3:"rd"} h, n = map(int, input().split()) H = [h] for _ in range(n - 1): H.append(int(input())) ans = sorted(H)[::-1].index(h) + 1 print(f"{ans}{m[ans] if ans % 10 in m else 'th'}")