1. 数学原理 对某个多项式函数有已知的k+1个点,假设任意两个不同的都互不相同,那么应用拉格朗日插值公式所得到的拉格朗日插值多项式为: 其中每个lj(x)为拉格朗日基本多项式(或称插值基函数),其表达式为: 2. 轻量级实现 利用 直接编写程序,可以直接插值,并且得到对应的函数值.但是不能得到系数,也不能对其进行各项运算. def h(x,y,a): ans=0.0 for i in range(len(y)): t=y[i] for j in range(len(y)): if i !=j:
F. The Sum of the k-th Powers 题目连接: http://www.codeforces.com/contest/622/problem/F Description There are well-known formulas: , , . Also mathematicians found similar formulas for higher degrees. Find the value of the sum modulo 109 + 7 (so you shoul