asdf


私信TA

用户名:longwuneng

访问量:3035

签 名:

longwuneng

等  级
排  名 17562
经  验 725
参赛次数 0
文章发表 3
年  龄 33
在职情况 在职
学  校 中国的大学都很水,当然我也很水
专  业

  自我简介:

实在太闲,写写代码解解闷

TA的其他文章

 

0.0分

1 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区

为什么我的不行嘞
     money=[100,50,10,2,1]
        cnt=0
        sali=list(map(int,input().split()))
        n=input()
        sal=sali[1:]

        sal=sorted(sal,reverse=True)#从大到小
        for j in sal:
            total = j
            if total > 0:
                for i in money:
                    if i<=total:
                        n=total//i
                        total=total-n*i
                        cnt=cnt+n
            continue
        print(cnt)
2024-04-07 11:05:48
  • «
  • 1
  • »