借楼,第三题涂栅栏,下面代码也没过,玄学 if __name__ == '__main__': line = input() length = int(line) for i in range(length) : line = input() temp_i1 = line.split(sep = " ") temp_i2 = [int(i) for i in temp_i1] for j in range(temp_i2[1]) : line = input() temp_k1 = line.split(sep = " ") temp_k2 = [int(i) for i in temp_k1] n = temp_i2[0] m = temp_i2[1] k = temp_i2[2] res = m * (m - k) ** (n - 1) # print(int(res % (1e9 + 7))) print(res)
点赞 评论
牛客网
牛客网在线编程
牛客网题解
牛客企业服务