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 1189. Pairs of Integers

whi i get WA end please tell me how i mast do it and i will tell you senc your?here is a my program
Posted by I am david. Tabo. 21 Apr 2002 11:43
var min,raod,max,i,j,n,l:longint;
    y:integer;
    k:byte;
    z,x,b,b1:string;
    a:array [1..100] of string;

procedure readdata;
  begin
    readln (n);
  end;

procedure number;
  begin
    str (n,x);
    k:=length (x);
    min:=1;
    for i:=1 to k-1 do
      min:=min*10;
    min:=n-min-1;
  end;

procedure solve;
  begin
    str (n,b1);
    for i:=min to n-1 do
      begin
        str (i,x);
        k:=length (x);
        z:=x;
        for j:=1 to k do
          begin
            delete (x,j,1);
            val (x,l,y);
            if i+l=n then
                begin
                inc (raod);
                str (i,b);
                a[raod]:=b+' + '+x+' = '+b1;
                break;
              end;
            x:=z;
          end;
      end;
  end;

procedure print;
  begin
    writeln (raod);
    for i:=1 to raod do
      writeln (a[i]);
  end;

begin
  readdata;
  number;
  solve;
  print;
end.
Re: whi i get WA end please tell me how i mast do it and i will tell you senc your?here is a my program
Posted by nr 8 May 2002 13:01
shecvale n n+1 it
Romeli n-i niko.romel xzze.darsmunebuli xar rom storia?
Posted by I am david. Tabo. 10 May 2002 00:27
romeli!!!!!!!!!!!!!!!!!!!!!!