1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-11-14 21:27:33 +01:00
CodeWars/8kyu/grasshopper_summation/solution.pas

17 lines
216 B
ObjectPascal
Raw Normal View History

unit GrashopperSummation;
{$mode objfpc}{$H+}
interface
function Summation(const N: Integer): Integer;
implementation
function Summation(const N: Integer): Integer;
begin
Result := N*(N + 1) div 2;
end;
end.