影挚
影挚
全部文章
分类
题解(166)
归档
标签
去牛客网
登录
/
注册
影挚的博客
全部文章
(共73篇)
题解 | #兔子的序列#
n = int(input()) li = list(map(int, input().split())) nu = [] for i in range(n): if li[i] in [1, 2, 3]: nu.append(li[i]) continue a = li[i] ** 0.5 if...
Python3
2022-04-29
0
512
题解 | #素数回文#
t = input() flag_t = len(t) % 2 t += t[-2::-1] t = int(t) for i in range(2, int(t ** 0.5) + 1): if t % i == 0: print('noprime') break if i == int(t **...
Python3
2022-04-28
0
281
题解 | #牛牛的数组匹配#
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
485
题解 | #牛牛的素数和#
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
241
题解 | #牛牛的短信#
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
278
题解 | #[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
231
题解 | #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
266
题解 | #数位五五#
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
349
题解 | #小乐乐计算函数#
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
324
题解 | #字符串操作#
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
382
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页