莫燿汶
莫燿汶
全部文章
分类
题解(62)
归档
标签
去牛客网
登录
/
注册
莫燿汶的博客
第一语言python的小白
全部文章
(共60篇)
题解 | #[NOIP2013]记数问题#
a, b = map(int, input().split()) c = [] for i in range(1, a + 1): c += list(str(i)) print(c.count(str(b)))
Python3
2022-04-22
0
182
题解 | #空心三角形图案#
while True: try: num = int(input()) a = 1 for i in range(num): if i == 0: print("*") ...
Python3
2022-04-22
0
258
题解 | #空心正方形图案#
while True: try: num = int(input()) for i in range(num): if i == 0 or i == num - 1: print("* " * num) ...
Python3
2022-04-22
0
215
题解 | #箭形图案#
while True: try: num = int(input()) a, b = num * 2, num for i in range(1, num * 2 + 2): # 应输出num*2+1行 if i &l...
Python3
2022-04-21
0
197
题解 | #乘法表#
这格式真累人,闲置两天又捡回来做 for i in range(1, 10): for j in range(1, i+1): print(j, "*", i, "=", str(j * i).rjust(2, " "), sep="", end= " ") prin...
Python3
2022-04-21
0
232
题解 | #菱形图案#
while True: try: num = int(input()) a, b = 0, num # num不能变,创建两个变量 for i in range(1, num*2+2): # 实际应该输出num+1行 ...
Python3
2022-04-21
1
327
题解 | #翻转金字塔图案#
while True: try: num =int(input()) a = num for i in range(num): print(" " * i + "* " * a) a -= 1 ...
Python3
2022-04-21
0
258
题解 | #带空格直角三角形图案#
while True: try: num = int(input()) for i in range(1, num + 1): print(" " * (num-i), "* " * i, sep="") # num - i两个空格...
Python3
2022-04-21
0
352
题解 | #[NOIP2015]金币#
num = int(input()) a, b, c = 0, 0, 0 while a < num: c += 1 # 每日金币数 持续天数 b += c * c # 金币总和 a += c # 总持续天数 print(b-((a-num)*c)) # b已...
Python3
2022-04-20
0
234
题解 | #小乐乐与进制转换#
num = int(input()) if 0 < num < 6: print(num) a = "" while num >= 6: b, c = num // 6, num % 6 a += str(c) if b < 6: ...
Python3
2022-04-20
0
265
首页
上一页
1
2
3
4
5
6
下一页
末页