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 1576. Telephone Tariffs

Help!
Posted by Vladikavkaz SOGU (K.Ivanova, I.Bichkaeva) 30 Oct 2007 21:52
help me please.
Why I've WA 1 ?
I use spaces in output format and my answers are true(((((

var i,k,n1,c1,p,n2,t,c2,n3:word;
    sum,sek:longword;
    code:integer;
    s:string;
begin
  //assign(input,'input.txt');
 // assign(output,'ouput.txt');
  readln(n1,c1);
  readln(n2,t,c2);
  readln(n3);
  readln(k);
  for i:=1 to k do
   begin
    readln(s);
    val(s,p,code);
    val(copy(s,4,2),sek,code);
    if (p=0) and (sek<=6) then sum:=sum
    else
     begin
      sum:=sum+p;
      if sek>0 then sum:=sum+1;
     end;
   end;
  writeln('Basic:     ',c1*sum+n1);
  if t>=sum then sek:=n2
  else sek:=n2+(sum-t)*c2;
  writeln('Combined:  ',sek);
  writeln('Unlimited: ',n3);
end.
Re: Help!
Posted by deshaion 3 Nov 2007 03:09
maybe more spaces, like this:
writeln('Basic:.....',
writeln('Combined:..',
writeln('Unlimited:.',
point = space ;)

Edited by author 03.11.2007 03:11