主题:TJU1023
Program TJU1023;
Var
c, k, d, j, m, temp, n, i, a, b: Integer;
Begin
Read(d);
For i:=1 To d Do Begin
Read(m, n);
b := 0;
a := abs(m-n);
If m<n Then Begin
temp := n;
n := m;
m := temp;
End;
For i:=m Downto 1 Do
b := i * (i-a) + b;
c := 0;
For k:=1 To m Do Begin
For j:=1 To n Do c:=k * j + c;
End;
c := c - b;
Writeln(b,' ',c);
End;
End.
这个程序我用tp、fp测试都通过了,为什么oj就不行呢?它显示Run Time Error[106]
Var
c, k, d, j, m, temp, n, i, a, b: Integer;
Begin
Read(d);
For i:=1 To d Do Begin
Read(m, n);
b := 0;
a := abs(m-n);
If m<n Then Begin
temp := n;
n := m;
m := temp;
End;
For i:=m Downto 1 Do
b := i * (i-a) + b;
c := 0;
For k:=1 To m Do Begin
For j:=1 To n Do c:=k * j + c;
End;
c := c - b;
Writeln(b,' ',c);
End;
End.
这个程序我用tp、fp测试都通过了,为什么oj就不行呢?它显示Run Time Error[106]