小伙子66
小伙子66
全部文章
分类
题解(24)
归档
标签
去牛客网
登录
/
注册
小伙子66的博客
全部文章
(共20篇)
题解 | #取近似值#
我这个走的字符串的路子,竟然也通过了,不知算不算剑走偏锋 import math num=float(input()) try: if str(num).split(".")[-1]>='5': print(math.ceil(num)) else: ...
Python3
2022-06-20
0
477
题解 | #字符串分隔#
l = input() for i in range(0, len(l), 8): print("{0:0<8}".format(l[i:i+8])) # format 格式。表示 输出0~8位字符,“<” 表示左对齐,冒号后的0表示以0填充其余位置
Python3
2022-06-16
7
867
题解 | #明明的随机数#
#感觉题目出得有问题,歧义有点大 理解错了还用了random num=int(input()) num_list=[] for i in range(num): ran=int(input()) num_list.append(ran) num_new=list(set(num_li...
Python3
2022-06-16
0
296
题解 | #拯救被污染的字符串#
my_str = 'I am$ N$iuniu$, an$d I $am stu$dying in $Now$coder!' my_list=my_str.split('$') print(my_list) print(''.join(my_list))
Python3
2022-06-16
0
266
题解 | #梦想的大学#
survey_dict={} while True: print('If you have the chance, which university do you want to go to most?') print('What is your name?') name=i...
Python3
2022-06-16
0
372
题解 | #售罄的培根披萨#
题目给的输出信息不对 注意!!!!!!!!!! pizza_inventory=['bacon','durian','bacon','bacon','chicken','durian'] while 'bacon' in pizza_inventory : pizza_inventory.r...
Python3
2022-06-15
1
373
题解 | #披萨店的订单#
pizza_orders=['chichen','bacon','durian'] finished_pizza=[] while len(pizza_orders)>0: pizza=pizza_orders[-1] pizza_orders.pop() print...
Python3
2022-06-14
0
340
题解 | #游乐园的门票#
while True: print("Please tell me your height!\nEnter 'quit' to end the program.") a = input() if a=='quit': break else: ...
Python3
2022-06-14
0
310
题解 | #被8整除的数字#
active=bool(True) while active==True: print("Please enter a positive integer!\nEnter 'quit' to end the program.") a=input() if a == 'quit'...
Python3
2022-06-14
0
385
题解 | #取号#
while True: print("Welcome! How many people, please?\nEnter 'quit' to end the program.") x=input() if x == 'quit': break elif ...
Python3
2022-06-14
0
302
首页
上一页
1
2
下一页
末页