bb凯
bb凯
全部文章
分类
归档
标签
去牛客网
登录
/
注册
bb凯的博客
全部文章
(共35篇)
题解 | 魔法数字变换
n = int(input()) count = 0 while True: if n != 1: if n % 2 == 0: n = n/2 count += 1 elif n % 2 != 0: ...
2025-11-23
1
14
题解 | 小乐乐查找数字
n = int(input()) a = list(map(int, input().split())) x = int(input()) count = 0 for i in a: if i == x: count += 1 print(count)
2025-11-23
1
11
题解 | 两个数组的交集
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums1 int整型一维数组 # @param nums2 int整型一维数组 # @return int整型一维数组 # class Solution: def inters...
2025-11-22
1
14
题解 | 矩阵计算
n,m = map(int, input().split()) a = [list(map(int, input().split())) for i in range(n)] sum = 0 for j in range(n): for y in a[j]: if y >...
2025-11-22
1
12
题解 | kiki算数
a,b = map(int, input().split()) m = a + b if a >= 100: g = a % 10 s = a // 10 % 10 if s == 0 and g != 0: a = g elif s == 0...
2025-11-21
1
17
题解 | 牛牛的快递
import math a,b = input().split() m = float(a) money = 0 if b == "n": if m <= 1: money = 20 elif m > 1: if m =...
2025-11-21
1
22
题解 | 牛牛的等差数列
m = list(map(int, input().split())) res = m[1] - m[0] print(m[1] + res)
2025-11-20
2
22
题解 | 牛牛的空格分隔
c = input() a = int(input()) f = float(input()) print(f"{c} {a} {f}")
2025-11-20
1
20
题解 | 牛牛的字符菱形
c = input() print(f" {c} ") print(f" {c+c+c} ") print(f"{c+c+c+c+c}") print(f" {c+c+c} ") print(f" {c}...
2025-11-20
1
25
题解 | 字符串哈希
n = int(input()) list = [] for i in range(n): s = input() if not list: list.append(s) elif list and s not in list: list.ap...
2025-11-19
1
18
首页
上一页
1
2
3
4
下一页
末页