|
|
вернуться в форумSOS! Послано Amy 18 июл 2003 15:24 This is my programme,please tell me why I got WA.Thank you! var n,m,m0,ys:longint; procedure pd(a,b:longint); var t:longint; begin if a<b then begin t:=b; b:=a; a:=t; end; while a mod b<>0 do begin a:=a mod b; t:=a;a:=b;b:=t; end; ys:=b; end; procedure run; var i:integer; begin for i:=1 to n-1 do begin read(m); pd(m0,m); m0:=ys; end; writeln(ys); end; begin readln(n); read(m0); run; end. |
|
|