Home > Back-end >  Computer small white to the OJ homework
Computer small white to the OJ homework

Time:10-30

Feel good hard!!!!!!
Through big basis points in the structure of the solution (I really is a small white),

Problem description:
Known integer a, b, c, your task is to calculate range [a, b] within the integer, satisfy the number and the number of "the all factor (not including itself but including factor and handled as 0, 1, 1) the sum of" the absolute value of the difference between the Numbers less than or equal to c, such as 27,3,9 factor is 1, then with 27 all factor and the difference is: 27 - (1 + 3 + 9)=14,

The input and output requirements:
Enter three integers a, b, c, a, b represent demanding range, meet the 1 & lt;=a<=b<=10000, c represents constraints, c>=0, output meet the conditions of an integer, number for every five line, integer between use TAB delimited, after the last number for line breaks, when no qualified in the area of integers, output "There is no proper number in the interval."

Program running effect:
Sample 1:
1 10000 0
June 28, 496, 8128
Sample 2:
2000, 5000, 4
2048 2144 4030 4096
Sample 3:
900, 1000,
There is no proper number in the interval.
  • Related