We're given integer N. For integer D > 0 we say that he is divisor for N, if D divides N. What is the arithmetic mean of all the divisors of the given number N?
Input: One and only row of the standard input contains integer N (1<=N<=10^9).
Output: In a single line of standard output to print arithmetic mean of divisors given natural number. Number printed with an accuracy of two decimal places.
Please, I need help.
1
Expert's answer
2013-01-30T09:17:41-0500
program pr1; USES CRT; var N,k,i:integer; s:real; begin CLRSCR; readln(N); for i := 1 to N do if (N mod i = 0) then begin s:=s+i; k:=k+1;
Numbers and figures are an essential part of our world, necessary for almost everything we do every day. As important…
APPROVED BY CLIENTS
"assignmentexpert.com" is professional group of people in Math subjects! They did assignments in very high level of mathematical modelling in the best quality. Thanks a lot
Comments
Leave a comment