1.9 编程基础之顺序查找 10 找最大数序列(5分) python

http://noi.openjudge.cn/ch0109/10/

"""

1.9 编程基础之顺序查找 10 找最大数序列(5分)
http://noi.openjudge.cn/ch0109/10/

使用python创建一个n*空的二维数组
https://blog.csdn.net/weixin_40378404/article/details/93214422

//k是第二维数组的个数
arr=[[] for i in range(k)]

python创建二维列表的两种方法
https://blog.csdn.net/liangjiubujiu/article/details/82153095


Python中List二维数组
https://blog.csdn.net/mimi9919/article/details/51458342

Python 创建二维列表list
https://blog.csdn.net/cxj540947672/article/details/85257589

python list 创建二维数组的坑
https://blog.csdn.net/lccrun/article/details/98205870

python list二维数组列数_Python创建二维数组的正确姿势
https://blog.csdn.net/weixin_39658759/article/details/113582574
https://blog.csdn.net/figo8875/article/details/90300989
https://blog.csdn.net/yockie/article/details/46127829

在多维数组中遍历其中的单个元素 --python
https://blog.csdn.net/weixin_43236007/article/details/104476943

三、Python语法基础---序列、列表、元组
https://blog.csdn.net/qq_37958578/article/details/104809927
https://www.jb51.net/article/142196.htm

"""
n=int(input())

num_list = [ []  for i in range(n)]
#print(num_list)

k=0
max=0
while k<n:
 
            a=list(map(int,input().split(',')))

            lena=len(a)
            #print(lena)

            i=0
            while i<lena:
                        num_list[k].append(a[i])
                        
                        if a[i]>max:
                                    max=a[i]
                                    
                        i+=1
            k+=1
 
print(max)
#print(num_list)

ans=[]

k=0
while k<n:
 
            for num in num_list[k]:
                        if num==max:
                                    #print(k+1,end=',')
                                    ans.append(k+1)
                                    
            k+=1
#print(ans)


lenx=len(ans)

j=0

while j<lenx-2:
            print(ans[j],end=',')
            j+=1
print(ans[j])

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

dllglvzhenfeng

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值