ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1255. Graveyard of the Cosa Nostra

Why 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