結果
| 問題 |
No.1380 Borderline
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-10-13 10:05:13 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
AC
|
| 実行時間 | 33 ms / 2,000 ms |
| コード長 | 315 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 12,672 KB |
| 実行使用メモリ | 10,880 KB |
| 最終ジャッジ日時 | 2024-06-26 11:53:45 |
| 合計ジャッジ時間 | 3,305 ms |
|
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 41 |
ソースコード
def main():
N, K = map(int, input().split())
scores = list(map(int, input().split()))
scores.sort(reverse=True)
if K == N:
print(N)
return
if scores[K-1] > scores[K]:
print(K)
return
print(scores.index(scores[K-1]))
if __name__ == "__main__":
main()