Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

PASCAL!

Posted by 875319120 at 2012-08-24 16:26:30 on Problem 2209
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator