AlphaGrey
AlphaGrey
全部文章
分类
华为刷题(57)
题解(6)
归档
标签
去牛客网
登录
/
注册
AlphaGrey的博客
一起刷题吧
全部文章
(共25篇)
题解 | #进制转换#
import sys for line in sys.stdin: data=line[:-1] num=int(data, 16) print(num)
Python3
字符串
2021-10-13
0
282
题解 | #密码强度等级#
import sys import re for line in sys.stdin: pwd=line.strip() score=0 # length if len(pwd)>=8: score+=25 elif len(pwd)...
Python3
字符串
2021-09-29
0
333
题解 | #查找输入整数二进制中1的个数#
import sys for line in sys.stdin: num=int(line[:-1]) binary_string=f'{num:b}' print(binary_string.count('1'))
Python3
字符串
2021-09-28
0
301
题解 | #四则运算#
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
首页
上一页
1
2
3
下一页
末页