var i,n:integer; x,y:array[1..20] of real; t,s:real;
begin repeat readln(n) until (n>1) and (n<=20);
For i:=1 to n do readln(x[i]);
t:=0;
For i:=1 to n do y[i]:=x[i];
For i:=1 to n do
begin repeat if y[i]/3=1 then break else y[i]:=y[i]/3 until y[i]<1;
If y[i]<1 then continue else
begin t:=x[i]; break
end
end;
S:=0;
For i:=1 to n do If x[i]>t then s:=s+x[i]; writeln('s=',s) end.
Հաշշվում է բոլոր դրական թվերի համար (3-ը ներառյալ):




Մեջբերել
Էջանիշներ