fork download
  1. using System;
  2. using System.Numerics;
  3.  
  4. public class Test
  5. {
  6. public static void Main()
  7. {
  8. System.Console.WriteLine(factorial(2222).ToString().Length);
  9. }
  10.  
  11. static BigInteger factorial(int n)
  12. {
  13. BigInteger f = 1;
  14. for (int i = 2; i <= n; i++)
  15. f *= i;
  16. return f;
  17. }
  18. }
Success #stdin #stdout 0.04s 29472KB
stdin
Standard input is empty
stdout
6474