1
0
Fork 0
mirror of https://gitlab.com/mfocko/CodeWars.git synced 2024-11-24 01:31:56 +01:00
CodeWars/8kyu/grasshopper_summation/solution.pas

17 lines
216 B
ObjectPascal
Raw Permalink 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.