影挚
影挚
全部文章
题解
归档
标签
去牛客网
登录
/
注册
影挚的博客
全部文章
/ 题解
(共71篇)
题解 | #牛牛的数组匹配#
m, n = map(int, input().split()) a, b = list(map(int, input().split())), list(map(int, input().split())) c = sum(a) d, e, end = 0, 0, c x, y = 0, n - ...
Python3
2022-04-28
0
446
题解 | #牛牛的素数和#
def compute_num(x, y): sum_num = 0 for i in range(x, y+1): if i in [2, 3]: sum_num += i continue for j in range(3, i//2 + 1): if i % j == 0: break if ...
Python3
2022-04-27
0
233
题解 | #牛牛的短信#
def compute_num(x): li = input().split() price = 0 for item in li: if int(item) > 60: price += 0.2 else: price += 0.1 return price a = int(input())...
Python3
2022-04-27
0
270
题解 | #[NOIP2010]数字统计#
def compute_num(x, y): count = 0 for i in range(x, y + 1): count += str(i).count('2') return count a, b = map(int, input().split()) print(compute_num(...
Python3
2022-04-27
0
221
题解 | #The Biggest Water Problem#
def compute_num(x): while len(x) != 1: end = 0 for item in str(x): end += int(item) x = str(end) return x a = input() print(compute_num(a))
Python3
2022-04-27
0
250
题解 | #数位五五#
def compute_num(x, y): count = 0 for i in range(x, y+1): i = list(map(int,' '.join(str(i)).split())) if sum(i) % 5 == 0: count += 1 return count a, b=...
Python3
2022-04-27
0
331
题解 | #小乐乐计算函数#
def compute_num(x, y, z): molecule = max(x + y, y, z) * 3 denominator = max(x, y + z, z) * 3 + max(x , y, y + z) * 3 return molecule / denominator a, ...
Python3
2022-04-27
0
308
题解 | #字符串操作#
m, n = map(int, input().split()) str_use = list(input()) for j in range(n): a, b, c, d = input().split() for j in range(int(a)-1,int(b)): if str_use[j...
Python3
2022-04-27
0
363
题解 | #[NOIP2008]笨小猴#
n = ' '.join(input()).split() num = len(n) // 3 if len(n) % 3 == 0 else len(n)//3 + 1 if len(n) > 3: for i in range(1, num): n.insert(-4 * i + 1, '...
Python3
2022-04-27
0
303
题解 | #[NOIP2008]笨小猴#
str_use = input() li = [] for item in str_use: li.append(str_use.count(item)) num, flag = max(li) - min(li), 0 for i in range(2, num // 2 + 1): if num...
Python3
2022-04-27
0
285
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页