in general , Easier than practice .....
python The running time ranking is not dominant
Answer key :
t,h,e = map(int,input().split())
grade = t*0.2 + h*0.3 + e *0.5
print(int(grade))
Answer key
n = int(input())
list_ = []
score = []
grade = 0
for i in range(n):
a,p = map(int,input().split())
list_.append([a,p])
# i[0] It's the basic score i[1] It's the number of pages
for i in list_:
if i[1] < 16:
if i[0] - 10 < 0:
grade = 0
else:
grade = i[0] - 10
if i[1] > 20:
grade = i[0] - (i[1]-20)
if grade < 0:
grade = 0
if i[1]>=16 and i[1]<=20:
grade = i[0]
print(grade)
n = int(input())
a_list = list(map(int,input().split()))
min_a = min(a_list)
max_a = max(a_list)
for a in a_list:
grade = 100 * (a-min_a)/(max_a-min_a)
print(int(grade),end=' ')
n = int(input())
num_list = []
for i in range(n):
num_list.append(int(input()))
def isPrime3(n):
if n==2:
return True
if n%2 == 0 or n==1:
return False
# Judge only odd numbers , Halve the scope
for i in range(3, int(n**0.5)+1, 2):
if n%i == 0:
return False
return True
for i in num_list:
count = 0
n = 0
while n<i:
num = i^n
if isPrime3(num):
count+=1
n+=1
print(count)
# n operations k A field
n,k = map(int,input().split())
list_ = []
for i in range(n):
list_.append(list(map(int,input().split())))
# Build table
dict_ = {}
for i in range(1,k+1):
dict_[i] = []
for i in range(len(list_)):
# Query initial value is 0
count = 0
list_2 = list_[i][2:]
# This is an insert operation
if list_[i][0] == 1:
for j in range(len(list_2)):
if j%2 == 0:
dict_[list_2[j]].append(list_2[j+1])
# This is a query operation
if list_[i][0] == 2:
min_y = list_[i][2]
max_y = list_[i][3]
for value in dict_[list_[i][1]]:
if value>=min_y and value<=max_y:
count+=1
print(count)