| ||NOTE: This problem statement contains superscripts that may not display properly if viewed outside of the applet.
A positive integer is called nice if the sum of its digits is equal to S and the product of its digits is equal to 2p2 * 3p3 * 5p5 * 7p7. Return the sum of all nice integers, modulo 500,500,573.
|Parameters:||int, int, int, int, int|
|Method signature:||int getSum(int p2, int p3, int p5, int p7, int S)|
|(be sure your method is public)|
|-||p2, p3, p5 and p7 will each be between 0 and 100, inclusive.|
|-||S will be between 1 and 2,500, inclusive.|
|There are two nice integers: 22 and 4. Their sum is 26.|
|A single nice integer is 1,111,111,111.|
|41 + 14 + 221 + 212 + 122 = 610.|
|There are no nice integers in this case.|