Roundgod is obsessive about numbers. Let SSSbe the sum of the digits of xxx in decimal notation, (A,B)(A,B)(A,B)is a harmony pair if and only if S>SS>SS>S. Roundgod is given NNN, and she wants to count the number of harmony pairs (A,B)(A,B)(A,B) modulo109+710^9+7109+7satisfying 0≤A≤B≤N0le Ale Ble N0≤A≤B≤N.
Roundgod is obsessive about numbers. Let S(x)S(x)S(x) be the sum of the digits of xxx in decimal notation, (A,B)(A,B)(A,B) is a harmony pair if and only if S(A)>S(B)S(A)>S(B)S(A)>S(B). Roundgod is given NNN, and she wants to count the number of harmony pairs (A,B)(A,B)(A,B) modulo 109+710^9+7109+7 satisfying 0≤A≤B≤N0le Ale Ble N0≤A≤B≤N.

(图片来源网络,侵删)