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 |
Re:那里错了?????In Reply To:那里错了????? Posted by:eric5518 at 2015-04-11 16:16:30 终于对了!! var a:array[1..16] of integer; i,n,j,x,sum:integer; begin read(a[1]); while a[1]<>-1 do begin n:=2;sum:=0; repeat read(a[n]); inc(n); until a[n-1]=0; dec(n); for i:=1 to n do for j:=1 to n do if a[j]=2*a[i] then inc(sum); writeln(sum); read(a[1]); end; end. Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator