我是芭芭拉的狗
我是芭芭拉的狗
全部文章
分类
归档
标签
去牛客网
登录
/
注册
我是芭芭拉的狗的博客
全部文章
(共162篇)
题解 | 特殊的科学计数法
n = input() c = len(n) - 1 x = int(n[1]) j = 0 if int(n[2]) >= 5: x = x + 1 if x == 10: x = 0 j = 1 z = int(n[0]) + j if z ...
2025-12-24
1
30
题解 | 九倍平方数
n = int(input()) while True: try: n = input() s = 0 shu2 = 0 shu3 = 0 for i in n: s += int(i) ...
2025-12-24
1
33
题解 | 元素方碑
zu = int(input()) while True: try: n = int(input()) l = list(map(int,input().split())) s = 0 for i in l: ...
2025-12-24
1
24
题解 | 变幻莫测
x, y = map(int, input().split()) c = 0 while x != y: if c < 100: if x != 0: x, y = x + y,x - y else: x,...
2025-12-24
1
25
题解 | 魔法棒
n = int(input()) for _ in range(n): m = int(input()) - 1 s = m // 8 y = m % 8 g = 0 for i in range(s+1): if y % 3 == 0: ...
2025-12-23
1
22
题解 | 小红的字符串修改
n1 = input() n2 = input() c = len(n1) cha = len(n2) - len(n1) cimin = float('inf') for i in range(cha+1): n3 = n2[i:c + i] s = 0 for a1,a2...
2025-12-23
1
23
题解 | 穷哈哈~
n = int(input()) s = input() max = 0 c = 0 q = None for i in s: if i != 'a' and i != 'h': q = None continue if q is None: ...
2025-12-23
1
22
题解 | 买橘子
n = int(input()) g = n // 8 y = n % 8 if y == 2 or y == 4 or y == 6: g = g + 1 elif y == 0: g = g else: g = -1 if n == 2 or n == 4 or n =...
2025-12-23
1
26
题解 | 蛇形矩阵
n = int(input()) a = [[0] * n for _ in range(n)] x, y, d = 0, 0, 0 dirs = [(-1, 1), (1, -1)] num = 1 while num <= n * n: a[x][y] = num num...
2025-12-21
1
30
题解 | 回文数
n = int(input()) m = input().strip() def a(s, b): return int(s, b) def b(c, d): e = "0123456789ABCDEF" if c == 0: return...
2025-12-21
1
28
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页