結果
問題 | No.564 背の順 |
ユーザー | HAGI_TARO |
提出日時 | 2021-09-30 09:57:33 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 68 ms / 2,000 ms |
コード長 | 374 bytes |
コンパイル時間 | 276 ms |
コンパイル使用メモリ | 86,980 KB |
実行使用メモリ | 71,424 KB |
最終ジャッジ日時 | 2023-09-24 12:21:32 |
合計ジャッジ時間 | 1,922 ms |
ジャッジサーバーID (参考情報) |
judge15 / judge11 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 68 ms
71,172 KB |
testcase_01 | AC | 66 ms
71,052 KB |
testcase_02 | AC | 67 ms
71,212 KB |
testcase_03 | AC | 66 ms
71,096 KB |
testcase_04 | AC | 67 ms
71,208 KB |
testcase_05 | AC | 67 ms
71,344 KB |
testcase_06 | AC | 65 ms
71,368 KB |
testcase_07 | AC | 65 ms
71,164 KB |
testcase_08 | AC | 67 ms
71,424 KB |
testcase_09 | AC | 68 ms
71,216 KB |
testcase_10 | AC | 66 ms
71,416 KB |
testcase_11 | AC | 64 ms
71,180 KB |
ソースコード
h,n = map(int,input().split()) H = [h] for i in range(n-1): H.append(int(input())) H.sort(reverse=True) if str(H.index(h) + 1)[-1] == "1": print(str(H.index(h) + 1) + "st") elif str(H.index(h) + 1)[-1] == "2": print(str(H.index(h) + 1) + "nd") elif str(H.index(h) + 1)[-1] == "3": print(str(H.index(h) + 1) + "rd") else: print(str(H.index(h) + 1) + "th")