Problem 158A — Next Round

Revision en1, by faahad.hossain, 2023-01-24 22:43:17

In this problem, most of the solution was used by lambda.

I have no idea why? You can easily use regular normal python syntax and data structures. My solution with python is as follows:

participents_count, position = map(int, input().split(' '))
total_advanced = 0

scores = list(map(int, input().split(' ')))
for point in scores:
    if point >= scores[position-1] and point != 0:
        total_advanced += 1


The complex part to me was understanding the second integer of the first line. Actually it was teling about the position the participents input to be calculated

Tags #158asolution, python3


  Rev. Lang. By When Δ Comment
en2 English faahad.hossain 2023-01-24 22:53:47 693
en1 English faahad.hossain 2023-01-24 22:43:17 648 Initial revision (published)