腾讯0分代码求解
# 0% 为什么? 摘果子 import math n, m = map(int, input().split()) W = list(map(int, input().split())) M = list(map(int, input().split())) for i in M: test = 0 for j in W: if i == 1 and 1 in W and len(W) >= 2: W.sort() print(1, W[1]) test = 1 break if 1 in W and j == i: print(j, 1) test = 1 break elif j <= i and j != 1: a = math.log(i, j) W.remove(j) if a in W: print(j, int(a)) test = 1 break W.append(j) if test == 0: print(-1, -1) # 0% 为什么? 奇怪的面积 k, b = map(int, input().split()) def erfen(k1, b1, i, j): mid = (i + j) / 2 if abs(mid ** k1 + mid - b1) < 0.00001: return mid elif mid ** k1 + mid - b1 > 0: ans = erfen(k1, b1, i, mid) else: ans = erfen(k1, b1, mid, j) return ans if k == 1: S = (b ** 2) / 4 print('%.10f' % S) else: c = erfen(k, b, 0, b) d = b - c S = 1 / 2 * d ** 2 + c ** (k + 1) / (k + 1) print('%.10f' % S)
#腾讯##笔试题目#