結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2021-01-06 17:31:38 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 318 bytes |
コンパイル時間 | 108 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-07 02:54:49 |
合計ジャッジ時間 | 1,074 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | WA * 9 |
ソースコード
H, N = map(int, input().split()) s = [int(input()) for _ in range(N-1)] aft = ["st", "nd", "rd", "th"] l = s + [H] l.sort() idx = l.index(H) + 1 last = idx % 10 idx = str(idx) if last == 1: print(idx+aft[0]) elif last == 2: print(idx+aft[1]) elif last == 3: print(idx+aft[2]) else: print(idx+aft[3])