AlphaGrey
AlphaGrey
全部文章
分类
华为刷题(57)
题解(6)
归档
标签
去牛客网
登录
/
注册
AlphaGrey的博客
一起刷题吧
全部文章
(共55篇)
题解 | #记负均正#
import sys lines=sys.stdin.readlines() length=len(lines) for i in range(1, length//2+2, 2): count_negetive=0 count_positive=0 positive_s...
Python3
数学
2021-09-28
0
330
题解 | #四则运算#
import sys old_line=sys.stdin.readline()[:-1] line=old_line.replace('{', '(').replace('}', ')').replace('[', '(').replace(']', ')') # print(line) d...
Python3
字符串
数学
2021-09-28
0
255
题解 | #计算某字母出现次数#
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
首页
上一页
1
2
3
4
5
6
下一页
末页