3. N natural numbers of a1, a2 are set, …, aN (), each of which is in the range from 1 up to 10000. It is necessary to define quantity of natural dividers of work a1*a2 * …*an.nado to write the program on si

144
#include< stdio. h> int main () {int div [10001]; int i, d, n, x; long int p = 1; for (i = 0; i ; 10000; i ++) div[i] = 1; scanf (" %d ",& n); for (i = 0; i ; n; i ++) { scanf (" %d ",& x); d = 2; while (d & lt; = x) { while (x%d = = 0) { x / = d; div[d] ++; } d ++; } } for (i = 0; i ; 10000; i ++) p * = div[i]; printf (" %ld ", p); return 0; }/* Small explanation: The idea of the decision is that any divider of result is representable as the work of prime numbers in certain degrees. Then a set of these degrees unambiguously defines a sostvuyushchy divider. The maximum degree with which the prime number can be taken is the sum of degrees with which it enters multipliers. For simplicity the massif of occurrences of dividers is set from 0 to 10000, but since search of dividers of multipliers goes on increase, only simple dividers will be considered. Example: 10 * 8 * 9 = 720 10 = 2^1*5^2 8 = 2^3 9 = 3^2 I.e. number 2 is included into the work in the fourth degree, 3 - in the second, 5 - in the first. Any divider of number 720 means we will present (uniquely) in the form 2^ (d2) * 3^ (d3) * 5^ (d5) where d2 = 0. 4, d3 = 0. 2, d5 = 0. 1 For example, 1 = 2^0 * 3^0 * 5^0, 720 = 2^4 * 3^2 * 5^1 there Are 5 ways to choose d2 (0,1,2,3,4), 3 ways to choose d3 and 2 ways to choose d5 - & gt; only 5 * 3 * 2 = 30 possible sets - & gt; 30 dividers at number 720 (if any number does not appear among dividers of multipliers, then it can be taken only in one way - with degree 0 - that does not influence on) */
156
Answer add
Blagoj

Other questions in the section - informatics
Burizel
Make the Pascal language program for the solution of the following task. Enter 3
2020-10-26 10:00:32
Evsevievich
To display all words from To letters in which the letter Yvstrechayetsya more than
2020-10-26 10:00:32
Gavilar
Read the poem by A. Starikov and determine the age of the girl. STRANGE
2020-10-26 10:00:32
Tarasov
Pascal. 2 natural numbers are entered. To remove their NOC. Please count please!
2020-10-26 10:00:32
Nonamsam
Napissat the program in a programming language.
2020-10-26 10:00:32