結果
問題 |
No.564 背の順
|
ユーザー |
![]() |
提出日時 | 2021-01-06 17:30:13 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 314 bytes |
コンパイル時間 | 288 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-07 02:53:10 |
合計ジャッジ時間 | 1,415 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | WA * 3 |
other | AC * 1 WA * 8 |
ソースコード
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) 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])