牛客734163773号
牛客734163773号
全部文章
分类
题解(14)
归档
标签
去牛客网
登录
/
注册
牛客734163773号的博客
全部文章
(共9篇)
题解 | #查找兄弟单词#
s = input().split() word, k = s[-2], int(s[-1]) lst = [] for i in s[1:-2]: if i != word and len(i) == len(word): letters = list(word) ...
Python3
2022-04-09
0
241
题解 | #自守数#
import math while True: try: n = int(input()) count = 0 for i in range(1, n+1): d = int(math.log10(i))+1 ...
Python3
2022-03-10
0
264
题解 | #记负均正#
while True: try: length = int(input()) nums = map(int, input().split()) res = [] count = 0 for i in nums: ...
Python3
2022-03-10
0
263
题解 | #记票统计#
while True: try: candidates = int(input()) cand_name = input().split() voters = int(input()) votes = input().split...
Python3
2022-03-08
6
412
题解 | #走方格的方案数#
先找出规律,然后用factorial来解 import math while True: try: n,m=map(int, input().split()) print(math.factorial(n+m)//(math.factorial(n)*math...
Python3
2022-03-08
0
245
题解 | #密码强度等级#
暴力解法 while True: try: pc = input() grade = alp = res = num = sym = 0 if len(pc) <= 4: grade += 5 elif len(pc) <= 7: grade += 10 else: grade += 2...
Python3
2022-03-08
0
294
题解 | #密码强度等级#
暴力解法 while True: try: pc = input() grade = alp = res = num = sym = 0 if len(pc) <= 4: grade += 5 el...
Python3
2022-03-08
1
291
题解 | #计算日期到天数转换#
year, month, day = map(int, input().split()) feb = 29 if (year % 4 == 0 and year % 100 != 0) or year % 400 ==0 else 28 thirty_one = [1, 3, 5, 7, 8, 10...
Python3
2022-03-01
1
280
题解 | #查找组成一个偶数最接近的两个素数#
while True: try: def isPrime(num): for i in range(2, num): if num % i == 0: return False return True num = int(input()) mid = num//2 end = mid + 1 for...
Python3
2022-02-22
0
297