因此,用户在一个字符串中输入n个数字的列表(不超过1000),程序会找到并输出下一个出现概率最高的数字。我是一个初学者,一直在计算可编程性,Python不允许我将列表元素和使用的方法都转换为int:
n = [int(input()), int(input()), int(input()), int(input()), int(input())]
for i in n:
P = collections.Counter([i]) / len(n)
print(P) # The program is supposed to determine the highest possibility and print the respective number afterwards