影挚
影挚
全部文章
分类
题解(166)
归档
标签
去牛客网
登录
/
注册
影挚的博客
全部文章
(共73篇)
题解 | #获得月份天数#
a = [1, 3, 5, 7, 8, 10, 12] while True: try: y, m = map(int, input().split()) if m in a: d = 31 elif m == 2: if y % 4 != 0: d = 28 else: d = 29 else: ...
Python3
2022-04-21
0
249
题解 | #计算一元二次方程#
import math while True: try: a, b, c = map(float, input().split()) d = b * b - 4 * a * c n = math.sqrt(abs(d)) if a == 0: print('Not quadratic equatio...
Python3
2022-04-21
0
277
题解 | #牛牛的计划#
y, ***p(int, input().split()) y1, m1, d1 = map(int, input().split()) if y1 > y: print('yes') elif y1 == y and m1 > m: print('yes') elif y1 == y ...
Python3
2022-04-19
0
285
题解 | #三角形判断#
while True: try: a, b, c = map(int, input().split()) if a + b > c and abs(a-b) < c: if a == b and a == c and b == c: print('Equilateral triangle...
Python3
2022-04-19
0
233
题解 | #HTTP状态码#
dic = {'200': 'OK', '202': 'Accepted', '400': 'Bad Request', '403': 'Forbidden', '404': 'Not Found', '500': 'Internal Server Error', '502': 'Bad Gatew...
Python3
2022-04-19
0
244
题解 | #牛牛的金币#
a, b = map(int, input().split()) c, d = map(int, input().split()) e, f = c - a, d - b if f == 1: print('u') elif f == -1: print('d') else: if e == 1: ...
Python3
2022-04-19
0
234
题解 | #计算商品打折结算金额#
a = float(input()) if 500 > a and a >= 100: b = a * 0.9 elif 2000 > a and a >= 500: b = a * 0.8 elif 5000 > a and a >= 2000: b = a *...
Python3
2022-04-19
0
211
题解 | #牛牛的快递#
import math a, b = input().split() if b == 'y': c = 5 else: c = 0 if float(a) < 1: c += 20 else: c = c + 20 + math.ceil((float(a) - 1)) print(c)
Python3
2022-04-19
0
311
题解 | #网购#
a, b, c, d = map(float, input().split()) if b == 11: end = a * 0.7 else: end = a * 0.8 if d: end -= 50 if end < 0: end = 0 print('%.2f' % end)
Python3
2022-04-19
0
330
题解 | #统计数据正负个数#
a = list(map(int, input().split())) b = len([x for x in a if x > 0]) c = len([y for y in a if y < 0]) print('positive:%d\nnegative:%d' % (b, c))
Python3
2022-04-19
0
326
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页