|
|
back to boardWhy my program is WA? Posted by Dim 19 Mar 2003 16:47 var N,K,Result:longint; begin Read(N,K); If N<K then Result:=0 Else Begin if N mod K=0 then Result:=(N*N) div K else Result:=(N*N-1) div k; end; Write(Result); end. check it out (+) Posted by Pasha 20 Mar 2003 01:49 > var N,K,Result:longint; > begin > Read(N,K); > If N<K then Result:=0 > Else > Begin > if N mod K=0 then Result:=(N*N) div K > else Result:=(N*N-1) div k; > > end; > Write(Result); > > end. > check it out (+) Posted by Pasha 20 Mar 2003 01:50 5 3 3 3 3 2 1 4 4 4 2 1 5 6 X 2 1 5 6 7 7 7 5 6 8 8 8 aidin_n7@hotmail.com |
|
|