結果
問題 |
No.564 背の順
|
ユーザー |
|
提出日時 | 2017-11-12 03:08:05 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 453 bytes |
コンパイル時間 | 307 ms |
コンパイル使用メモリ | 12,672 KB |
実行使用メモリ | 10,880 KB |
最終ジャッジ日時 | 2024-11-24 19:58:29 |
合計ジャッジ時間 | 1,271 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 WA * 1 |
other | AC * 5 WA * 4 |
ソースコード
H,N = [int(i) for i in input().split()] h = [] for i in range(N-1): h.append(int(input())) h.sort() #print(h) high = len(h) low = 0 while(high > low): mid = (low + high)//2 if h[mid] >= H: high = mid if h[mid] < H: low = mid + 1 if (N-low) % 10 == 1: print(str(N-low)+'st') if (N - low) % 10 == 2: print(str(N - low) + 'nd') if (N - low) % 10 == 3: print(str(N - low) + 'rd') else: print(str(N-low)+'th')