Problem 874 题目发布于 2024-01-27 翻译更新于 2024-03-21 Problem 874 Maximal Prime ScoreLet p(t) denote the (t+1)th prime number. So that p(0)=2, p(1)=3, etc.We define the prime score of a list of nonnegative integers [a1,…,an] as the sum ∑i=1np(ai).Let M(k,n) be the maximal prime score among all lists [a1,…,an] such that: 0≤ai<k for each i; the sum ∑i=1nai is a multiple of k. For example, M(2,5)=14 as [0,1,1,1,1] attains a maximal prime score of 14. Find M(7000,p(7000)). 最大质数得分记p(t)为第(t+1)个质数,因此p(0)=2,p(1)=3,依此类推。定义非负整数列[a1,…,an]的质数得分为∑i=1np(ai)。考虑所有满足如下条件的非负整数列[a1,…,an],记M(k,n)为其质数得分的最大值: 对于所有i,0≤ai<k; 数列和∑i=1nai是k的倍数。 例如,M(2,5)=14,最大质数得分14在数列[0,1,1,1,1]时取得。 求M(7000,p(7000))。
Gitalking ...