AlphaGrey
AlphaGrey
全部文章
题解
华为刷题(57)
归档
标签
去牛客网
登录
/
注册
AlphaGrey的博客
一起刷题吧
全部文章
/ 题解
(共4篇)
题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
import sys for line in sys.stdin: num=int(line[:-1]) print(num*2.875) print(num*0.03125)
Python3
数学
2021-10-19
59
3191
题解 | #计算某字母出现次数#
import sys inputs=sys.stdin.readlines() letters, char = inputs lower_letters=letters.lower()[:-1] lower_char=char.lower()[:-1] # print(lower_char)...
Python3
字符串
2021-09-28
0
298
题解 | #求int型正整数在内存中存储时1的个数#
import sys line=sys.stdin.readline() num=int(line) count=0 while num!=0: count+=1 num=num&(num-1) print(count)
Python3
数学
2021-09-27
1
612
题解 | #输入整型数组和排序标识,对其元素按照升序或降序进行排序#
import sys inputs=[data[:-1] for data in sys.stdin.readlines()] isReverse=False if inputs[2]=='1': isReverse=True nums=[int(num) for num in i...
Python3
数组
2021-09-27
2
908