![]()
找出出现的最早的最大值
count = 0
list_number = []
while True:
list_number.append(list(map(int, input().split())))
count += 1
if count == 7:
break
list2_number_total = []
for i1,i2 in list_number:
list2_number_total.append(i1+i2)
target = max(list2_number_total)
index = 0
if target > 8:
for i in list2_number_total:
if i == target:
print(index + 1)
break
else:
index += 1
else:
print(0)

需注意包装不能拆,且只能买同一种
target = int(input())
list_a = []
for i in range(3):
list_a.append(list(map(int, input().split())))
count1 = target // list_a[0][0] if target % list_a[0][0] == 0 else target // list_a[0][0] + 1
count2 = target // list_a[1][0] if target % list_a[1][0] == 0 else target // list_a[1][0] + 1
count3 = target // list_a[2][0] if target % list_a[2][0] == 0 else target // list_a[2][0] + 1
need1 = count1 * list_a[0][1]
need2 = count2 * list_a[1][1]
need3 = count3 * list_a[2][1]
print(min(need1, need2, need3))

没啥好说的
a, b, c = map(int, input().split())
bool = True
list = [a, b, c]
max_side = max(a, b, c)
list.remove(max_side)
if a + b <= c or a + c <= b or b + c <= a:
print("Not triangle")
bool = False
if bool:
if list[0] ** 2 + list[1] ** 2 == max_side ** 2:
print("Right triangle")
elif list[0] ** 2 + list[1] ** 2 > max_side ** 2:
print("Acute triangle")
else:
print("Obtuse triangle")
if a == b or a == c or b == c :
print("Isosceles triangle")
if a == b == c:
print("Equilateral triangle")

没什么好说的
target = int(input())
price1 = 0.4463
price2 = 0.4663
price3 = 0.5663
if target <= 150:
print("{:.1f}".format(price1 * target))
elif target <= 400:
print("{:.1f}".format((price1 * 150) + price2 * (target-150)))
else:
print("{:.1f}".format((price1 * 150) + price2 * 250 + price3 * (target - 400)))

只需要管起始位置就行
n1, n2 = map(int, input().split())
weeks = (n2-1) // 7
week_mlie = 1250
days = (n2-1) % 7
if n1 <= 5:
if n1 + days < 6:
print(week_mlie * weeks + 250 + days * 250 )
elif n1 + days < 7:
days -= 1
print(week_mlie * weeks + 250 + days * 250 )
else:
days -= 2
print(week_mlie * weeks + 250 + days * 250 )
elif n1 == 6:
if days == 0:
print(week_mlie * weeks + days * 250)
else:
days -= 1
print(week_mlie * weeks + days * 250)
elif n1 == 7:
if days == 6:
days -= 1
print(week_mlie * weeks + days * 250)
else:
print(week_mlie * weeks + days * 250)

因为只找正弦,所以直接剔除最长边就行
from math import *
list_number = list(map(int, input().split()))
max = max(list_number)
list_number.remove(max)
n1 = gcd(min(list_number[0], list_number[1]), max)
print("{:}/{:}".format(min(list_number[0] // n1, list_number[1]), max // n1))

没啥好说的
list_1 = list(map(int, input().split()))
target = int(input())
count = 0
for i in list_1:
if i <= target + 30:
count += 1
print(count)

没啥好说的
list_1 = list(map(int, input().split()))
str_1 = input()
a =min(list_1)
list_1.remove(a)
a = str(a)
b = min(list_1)
list_1.remove(b)
b = str(b)
c = str(list_1[0])
str_2 = str_1[0] + " " + str_1[1] + " " + str_1[2]
print(str_2.replace("A",a).replace("B",b).replace("C",c))
![]()
Right写成了right,花了我几个小时找,终于全过了
str_1 = input()
target = str_1[-1]
count = 1
sum = 0
for i in str_1:
if i == '-':
continue
sum += int(i) * count
count += 1
if count == 10:
break
target_count = sum % 11
if target_count == 10:
target_count = "X"
else:
target_count = str(target_count)
if target_count != str_1[12]:
print(str_1[:12:] + target_count)
else:
print("Right")
420

被折叠的 条评论
为什么被折叠?



