|
|
back to boardwhi i get WA end please tell me how i mast do it and i will tell you senc your?here is a my program var m,n,sol:longint; begin readln (m,n); if m=1 then sol:=(n+1) div 2 else if (m mod 3=0)or(n mod 3=0) then sol:=2 else sol:=1; writeln (sol); end. You must replace m and n if m>n. OK? Posted by meoden 23 Apr 2002 19:00 > var m,n,sol:longint; var tg:longint; > begin > readln (m,n); if m>n then begin tg:=m; m:=n; n:=tg; end; > if m=1 then > sol:=(n+1) div 2 > else > if (m mod 3=0)or(n mod 3=0) then > sol:=2 > else > sol:=1; > writeln (sol); > end. > > senk ypur a got ACCCCCCCC!!!!!!! > > var m,n,sol:longint; > var tg:longint; > > begin > > readln (m,n); > if m>n then > begin > tg:=m; > m:=n; > n:=tg; > end; > > if m=1 then > > sol:=(n+1) div 2 > > else > > if (m mod 3=0)or(n mod 3=0) then > > sol:=2 > > else > > sol:=1; > > writeln (sol); > > end. > > > > Re: senk ypur a got ACCCCCCCC!!!!!!! var m,n,sol:longint; var tg:longint; begin readln (m,n); if m>n then begin tg:=m; m:=n; n:=tg; end; if m=1 then sol:=(n+1) div 2 else if (m mod 3=0)or(n mod 3=0) then sol:=2 else sol:=1; writeln (sol); end.
Re: senk ypur a got ACCCCCCCC!!!!!!! Posted by SM 22 Dec 2006 10:32 but why?can anyone tell me? |
|
|