Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
PASCAL!var n,m,t,i,sum,tmp,j:longint; begin readln(n); readln(m); sum:=0; for i:=1 to n do begin read(t); tmp:=t; for j:=1 to m-1 do tmp:=tmp*t; if tmp>0 then sum:=sum+tmp; end; writeln(sum); end. 顶起PASCAL!!! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator