Problem 612 题目发布于 2017-10-22 翻译更新于 2017-12-19 Problem 612 Friend numbersLet’s call two numbers friend numbers if their representation in base 10 has at least one common digit.E.g. 1123 and 3981 are friend numbers. Let f(n) be the number of pairs (p,q) with 1≤p<q<n such that p and q> are friend numbers.f(100)=1539. Find f(1018) mod 1000267129. 朋友数我们称两个数为朋友数,如果它们的10进制表示中至少有一位数字相同。例如,1123和3981就是朋友数。 记f(n)为所有满足1≤p<q<n且p和q为朋友数的数对(p,q)数目。已知f(100)=1539。 求Find f(1018) mod 1000267129。
Gitalking ...