// PascalABC.NET 3.2, сборка 1482 от 12.06.2017
// Внимание! Если программа не работает, обновите версию!
begin
Write('Введите a b: ');
var (a,b):=ReadInteger2;
for var i:=0 to b do
Writeln(a,'^',i,' = ',Power(BigInteger(a),i));
for var i:=0 to a do
Writeln(b,'^',i,' = ',Power(BigInteger(b),i))
end.
Пример
Введите a b: 18 37
18^0 = 1
18^1 = 18
18^2 = 324
18^3 = 5832
18^4 = 104976
18^5 = 1889568
18^6 = 34012224
18^7 = 612220032
18^8 = 11019960576
18^9 = 198359290368
18^10 = 3570467226624
18^11 = 64268410079232
18^12 = 1156831381426176
18^13 = 20822964865671168
18^14 = 374813367582081024
18^15 = 6746640616477458432
18^16 = 121439531096594251776
18^17 = 2185911559738696531968
18^18 = 39346408075296537575424
18^19 = 708235345355337676357632
18^20 = 12748236216396078174437376
18^21 = 229468251895129407139872768
18^22 = 4130428534112329328517709824
18^23 = 74347713614021927913318776832
18^24 = 1338258845052394702439737982976
18^25 = 24088659210943104643915283693568
18^26 = 433595865796975883590475106484224
18^27 = 7804725584345565904628551916716032
18^28 = 140485060518220186283313934500888576
18^29 = 2528731089327963353099650821015994368
18^30 = 45517159607903340355793714778287898624
18^31 = 819308872942260126404286866009182175232
18^32 = 14747559712960682275277163588165279154176
18^33 = 265456074833292280954988944586975024775168
18^34 = 4778209346999261057189801002565550445953024
18^35 = 86007768245986699029416418046179908027154432
18^36 = 1548139828427760582529495524831238344488779776
18^37 = 27866516911699690485530919446962290200798035968
37^0 = 1
37^1 = 37
37^2 = 1369
37^3 = 50653
37^4 = 1874161
37^5 = 69343957
37^6 = 2565726409
37^7 = 94931877133
37^8 = 3512479453921
37^9 = 129961739795077
37^10 = 4808584372417849
37^11 = 177917621779460413
37^12 = 6582952005840035281
37^13 = 243569224216081305397
37^14 = 9012061295995008299689
37^15 = 333446267951815307088493
37^16 = 12337511914217166362274241
37^17 = 456487940826035155404146917
37^18 = 16890053810563300749953435929