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 1820. Ural Steaks

WA #7
Posted by andy777 25 Jan 2012 01:46
what is in the test #7?

here is my program

var n,k:longint;
begin
readln(n,k);
  if (n<=k) then write(2*n)
  else if (n mod k=0) then write(trunc(2*n/k))
       else write(trunc(1+(n-(n mod k))/k+((n-abs(k-(n mod k)))-((n-abs(k-(n mod k))) mod k))/k+((n-abs(k-(n mod k))) mod k)/k));
end.
Re: WA #7
Posted by programist_lady 11 Sep 2012 16:11
my sotution is WA#7 too. help me,pls