n = int(input()) n_5 = n//5 idea = 0 for x in range(n_5+1): idea += (x//2+1)*((n-5*x)//2+1) print(int(idea%(1e9+7)))运行时间: 46 ms 占用内存:3556K
n = int(input()) m = [1] + [0]*n for i in (1,2,5,10): for j in range(i,n+1): m[j] = (m[j] + m[j-i]) % 1000000007 print(m[-1])