文章

67

粉丝

207

获赞

29

访问

36.7k

头像
众数 题解:挑战更新python题解
P1352 哈尔滨工业大学机试
发布于2024年10月1日 19:15
阅读数 220

while True:
    try:
        line = [0]*11
        line[0] = 0
        list1 = list(map(int,input().split()))
        for i in range(0,20):
            if list1[i] == 10:
                line[10] = line[10] + 1
            elif list1[i] == 1:
                line[1] = line[1] + 1
            elif list1[i] == 2:
                line[2] = line[2] + 1
            elif list1[i] == 3:
                line[3] = line[3] + 1
            elif list1[i] == 4:
                line[4] = line[4] + 1
            elif list1[i] == 5:
                line[5] = line[5] + 1
            elif list1[i] == 6:
                line[6] = line[6] + 1
            elif list1[i] == 7:
                line[7] = line[7] + 1
            elif list1[i] == 8:
                line[8] = line[8] + 1
            elif list1[i] == 9:
                line[9] = line[9] + 1
        max = line[1]
        maxindex = 1
        for i in range(1,11):
            if max < line[i]:
                ma...
登录查看完整内容


登录后发布评论

暂无评论,来抢沙发