Ответы 1

  • using System;

    using System.Linq;

    namespace ConsoleApp21  {

       class Program  {

           static void Main(string[] args)  {

               int n=6, s=1;

               Int32.TryParse(Console.ReadLine(),out n);

               for(int i = 2; i <= n; i++)  {

                   int temp = Enumerable.Range(1, i).Aggregate(1, (res, t) => res * t);

                   s += temp;

               }

               Console.WriteLine(s);

           }

       }

    }

    answer img
  • Добавить свой ответ

Еще вопросы

Войти через Google

или

Забыли пароль?

У меня нет аккаунта, я хочу Зарегистрироваться

How much to ban the user?
1 hour 1 day 100 years