I got WA, please help give some test!
----------------------MY RROGRAM-----------------
type arr = record
a:array[1..100]of byte;
l:integer;
end;
var N,a,b,i:longint;
r,_a,_b:arr;
procedure mul_i(var a:arr;x:integer);
var c,k:longint;
i:integer;
begin
k:=0;
for i:=1 to a.l do
begin
c:=a.a[i];
a.a[i]:=(a.a[i]*x+k) mod 10;
k:=(c*x+k) div 10;
end;
while k<>0 do
begin
inc(i);
a.a[i]:=k mod 10;
k:=k div 10;
end;
a.l:=i;
end;
procedure mul_i2(var a:arr;x:integer;var d:arr;p:integer);
var c,k:longint;
i:integer;
begin
k:=0;
for i:=1 to a.l do
begin
c:=a.a[i];
d.a[i+p]:=(a.a[i]*x+k) mod 10;
k:=(c*x+k) div 10;
end;
while k<>0 do
begin
inc(i);
d.a[i+p]:=k mod 10;
k:=k div 10;
end;
d.l:=i+p;
end;
procedure add(var a,b:arr);
var m,i:integer;
k,c:byte;
begin
if a.l>b.l then m:=a.l else m:=b.l;
k:=0;
for i:=1 to m do
begin
c:=a.a[i];
a.a[i]:=(a.a[i]+b.a[i]+k) mod 10;
k:=(c+b.a[i]+k) div 10;
end;
if k = 1 then
begin
inc(i);
a.a[i]:=1;
end;
a.l:=i;
end;
procedure mul(var a,b:arr);
var c,d:arr;
i:integer;
begin
d.l:=0;fillchar(d,sizeof(d),0);
for i:=1 to a.l do
begin
c.l:=0;fillchar(c,sizeof(c),0);
mul_i2(b,a.a[i],c,i-1);
add(d,c);
end;
a:=d;
end;
procedure calc(a:longint;var s:arr);
var i:longint;
x:arr;
begin
fillchar(s,sizeof(s),0);
fillchar(x,sizeof(x),0);
s.l:=0;
x.l:=1;
x.a[1]:=1;
for i:=0 to a do
begin
{s:=s+x;}add(s,x);
{X:=X*N;}mul_i(x,N);
end;
end;
begin
readln(N,A,b);
calc(a,_a);
calc(B,_b);
mul(_a,_b);
for i:=_a.l downto 1 do write(_a.a[i]);
writeln;
end.