SlepoiKrot

Untitled

Jan 12th, 2018
45
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. program Project2;
  2.  
  3. {$APPTYPE CONSOLE}
  4.  
  5. uses
  6.   SysUtils;
  7.  
  8. var
  9.   n:int64;
  10.   s: double;
  11.   i, k:integer;
  12. begin
  13.   readln(n,k);
  14.   s:=1;
  15.   for i:=1 to k do begin
  16.     s:=s*((n-k+i) / i); //6
  17.   end;
  18.   writeln(s:1:0);
  19.   readln;
  20.   readln;
  21. end.
RAW Paste Data