题解列表

筛选

C二级辅导-求偶数和-题解(Python代码)

1、input获取输入的个数,此时得到的是string类型,需要用int转换成整数型;2、创建列表lst并读取键盘输入,split函数用来将输入根据空格转换为字符串列表,再用map函数将字符串转换成整数类型,最终返回到列表lst;3、for循环中range(x)用来表示从0递增到x的前一位,

发工资咯 (Python代码)

注记:python里有个内建函数divmod,挺适合这道题的,哈哈哈```pythondefcal(n):N1,remainder=divmod(n,100)N2,remainder=divmod(remainder,50)N3,remainder=divmod(remainder,

采药-题解(Python代码)

写着玩的,大家凑合着看吧,哈哈哈```pythontimeout,num=0,0#记录时间上限和草药数量t=[0]#记录每种草药的花费时间v=[0]#记录每种草药的价值timout,num=map(int,input().split())foriinrange(num):#赋值。