Data update
This commit is contained in:
parent
29a5eea0d4
commit
5c1bb7bfa9
2011 changed files with 35081 additions and 3229 deletions
13
Task/Man-or-boy-test/PascalABC.NET/man-or-boy-test.pas
Normal file
13
Task/Man-or-boy-test/PascalABC.NET/man-or-boy-test.pas
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
function A(k: integer; x1, x2, x3, x4, x5: function: integer): integer;
|
||||
begin
|
||||
var B: function: integer;
|
||||
B := () -> begin
|
||||
k := k - 1;
|
||||
Result := A(k, B, x1, x2, x3, x4);
|
||||
end;
|
||||
Result := if k <= 0 then x4() + x5() else B()
|
||||
end;
|
||||
|
||||
begin
|
||||
Print(A(10, () -> 1, () -> -1, () -> -1, () -> 1, () -> 0))
|
||||
end.
|
||||
Loading…
Add table
Add a link
Reference in a new issue