diff --git a/hackerrank/python/hr-nested-lists.py b/hackerrank/python/hr-nested-lists.py new file mode 100644 index 0000000..1579562 --- /dev/null +++ b/hackerrank/python/hr-nested-lists.py @@ -0,0 +1,21 @@ +if __name__ == '__main__': + ls = [] + min_score = 0 + + for i,e in enumerate(range(int(input()))): + name = input() + score = float(input()) + if i == 0: + min_score = score + elif score < min_score: + min_score = score + ls.append([name, score]) + + ls = [[i[0], i[1]] for i in ls if i[1] != min_score] + + min_score = min([i[1] for i in ls]) + + ls = [i[0] for i in ls if i[1] == min_score] + + for i in sorted(ls): + print(i) \ No newline at end of file