eolymp
bolt
Try our new interface for solving problems
dərc olunub 11.02.20 22:48:46

я не розумію

dərc olunub 05.01.24 21:01:38

c# - 100%

using System; using System.Numerics;

namespace ConsoleApp1 { internal class Program { static void Main() { BigInteger n = BigInteger.Parse(Console.ReadLine()); int a = 2; int b = 2; bool found = false;

        for (int i = 2; i <= 10000; i++)
        {
            BigInteger product = i;

            for (int j = i + 1; j <= 10000; j++)
            {
                product *= j;

                if (product == n)
                {
                    a = i;
                    b = j;
                    found = true;
                    break;
                }

                if (product > n)
                    break;
            }

            if (found)
                break;
        }

        Console.WriteLine(a + " " + b);
        Console.ReadKey();
    }
}

}

dərc olunub 09.02.24 13:00:57

більше 30% не проходить, допоможіть розв'язати на паскалі.