Advertisement
RvnDrk

06.Calculate Again

Apr 20th, 2016
127
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. using System;
  2. using System.Numerics;
  3. class CalculateAgain
  4. {
  5. static void Main(string[] args)
  6. {
  7. int n = int.Parse(Console.ReadLine());
  8. int k = int.Parse(Console.ReadLine());
  9. BigInteger factorialN = 1;
  10. BigInteger factorialK = 1;
  11. for (int i = 1; i <= n; i++)
  12. {
  13. factorialN *= i;
  14. }
  15. for (int i = 1; i <= k; i++)
  16. {
  17. factorialK *= i;
  18. }
  19. Console.WriteLine(factorialN / factorialK);
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement