牛客263号
牛客263号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客263号的博客
全部文章
/ 题解
(共13篇)
题解 | #密码游戏#
a = input() b = [] for i in range(len(a)): x = (int(a[i])+3)%9 b.append(x) b[0], b[2] = b[2], b[0] b[1], b[3] = b[3], b[1] for i in b: pri...
Python3
2022-06-24
126
3035
题解 | #九九乘法表#
a = int(input()) for i in range(1,a+1): for j in range(1,i+1): print(str(i)+"*"+str(j)+"="+str(i*j), end=" ") print()
Python3
2022-06-24
2
317
题解 | #牛牛的绩点#
gl = {"A":4.0, "B":3.0, "C":2.0, "D":1.0, "F":0} al = [] bl = [] while True: g = input() if g == "False": break else: sco ...
Python3
2022-06-23
40
1105
题解 | #提取电话号码#
p = input().split("#")[0].split(" ")[0] print(p) for i in p.split("-"): print(i, end="") print()
Python3
2022-06-13
0
285
题解 | #图形面积#
比较复杂 import math, cmath pi = math.pi class Square(object): def __init__(self, line): self.line = line def Calculated_area(self): ...
Python3
2022-06-13
0
338
题解 | #班级管理#
class Student(object): def __init__(self, name, sid, score, homework): self.name = name self.id = sid self.score = score ...
Python3
2022-06-10
1
331
题解 | #球的体积与表面积#
import math pi = math.pi a = input().split(" ") for i in a: r = int(i) print("%.3f" % (pi*r*r*r/3*4), "%.3f" % (4*pi*r*r))
Python3
2022-06-10
0
0
题解 | #牛牛学字母#
s = input() a = dict() for i in range(len(s)): try: a[s[i]] += 1 except: a[s[i]] = 1 for k, v in a.items(): print(k, v)
Python3
2022-06-10
0
290
题解 | #查字典#
fruit = ['apple', 'banana', 'strawberry', 'orange', 'mango', 'grape', 'blueberry'] number = [1,3,5,6,13,21,10] di = dict() for i in range(len(fruit)):...
Python3
2022-06-10
6
0
题解 | #字符类型计数#
X = input() alpha, digit, space, other = 0, 0, 0, 0 for i in range(len(X)): a = ord(X[i]) if a >= 65 and a <= 90: alpha += 1 ...
Python3
2022-06-10
0
243
首页
上一页
1
2
下一页
末页