Beispiel #1
0
 private string GetAns(string type, string task)
 {
     type = GetTypeOfTheTask(type);
     return(type switch
     {
         "math" => MathSolution.GetAns(task),
         "polynomial-root" => PolynomsSolver.GetRoot(task),
         "shape" => ShapeSolver.GetAns(task),
         "determinant" => MatrixDetSolver.GetAns(task),
         "cypher" => Caesar.GetAns(task),
         "string-number" => StringNumber.GetNumber(task),
         "starter" => "42",
         "inverse-matrix" => InverseMatrix.GetAnswer(task),
         _ => string.Empty
     });
Beispiel #2
0
 private string GetAns(string type, string task)
 {
     type = GetTypeOfTheTask(type);
     return(type switch
     {
         "math" => MathSolution.GetAns(task),
         "polynomial-root" => PolynomsSolver.GetRoot(task),
         "shape" => ShapeSolver.GetAnswer(task),
         "determinant" => MatrixDetSolver.GetAns(task),
         "cypher" => Caesar.GetAns(task),
         "string-number" => StringNumber.StringToNumber(task),
         "starter" => "42",
         "json" => Json.GetAnswer(task),
         "inverse-matrix" => InverseMatrix.GetAnswer(task),
         _ => "Я не знаю тип задания, помогите"
     });
Beispiel #3
0
 static void Main(string[] args)
 {
     /*
      * const string teamSecret = "wHUYV6IVfJh7akUFzCmSqG9Fk/z/GwX"; // Вставь сюда ключ команды
      * var challengeClient = new ChallengeClient(teamSecret);
      * const string challengeId = "projects-course";
      * var challenge = challengeClient.GetChallengeAsync(challengeId).Result;
      * var sender = new Sender();
      * sender.ShowResults(challengeClient);
      * Console.WriteLine("Insert type of your task");
      * string type = Console.ReadLine();
      * Console.WriteLine("Insert number of tests");
      * var count = int.Parse(Console.ReadLine());
      * sender.SendSomeAnswers(challengeClient, challenge, type, count);
      * //*/
     Console.WriteLine(Caesar.GetAns("first longest word=quirrell|7c5zmcp24z7yz7qvyz yywzecze9phd4z7yo4zeyywzspd''y22z97y'yz97q9zvy'3z4q3ze7qkywz7qw4ez5d97z7dlzdwz97y"));
 }
Beispiel #4
0
        private string GetAns(string type, string task)
        {
            task = GetTypeOfTheTask(type);
            switch (type)
            {
            case "math": return(MathSolution.GetAns(task));

            case "polynomial-root": return(PolynomsSolver.GetRoot(task));

            case "shape": return(ShapeSolver.GetAns(task));

            case "determinant": return(MatrixDetSolver.GetAns(task));

            case "cypher": return(Caesar.GetAns(task));

            case "string-number": return(StringNumber.GetNumber(task));

            case "starter": return("42");

            default: return(string.Empty);
            }
        }