Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Numerics;
- using System.Globalization;
- namespace Feb26_2018
- {
- class MainClass
- {
- /* */
- public static void Main()
- {
- //int k = int.Parse(Console.ReadLine());
- //var input = Console.ReadLine()
- // .Split()
- // .Select(double.Parse)
- // .ToList();
- //var firstK = input.Take(k);
- //var asd = input.ToArray().Reverse();
- //Console.WriteLine(asd);
- int snwbNum = int.Parse(Console.ReadLine());
- int[] snwbData = new int[snwbNum * 3];
- int snwbPower = 0;
- int maxSnwbPower = Int32.MinValue;
- int bestIndexOne = 0;
- int bestIndexTwo = 0;
- int bestIndexThree = 0;
- for (int a = 0; a < snwbData.Length; a++)
- {
- snwbData[a] = int.Parse(Console.ReadLine());
- }
- for (int i = 0; i < snwbData.Length; i++)
- {
- if ((i + 1) % 3 == 0)
- {
- snwbPower = (int)Math.Pow((snwbData[i - 2] / snwbData[i - 1]), snwbData[i]);
- if (snwbPower > maxSnwbPower)
- {
- maxSnwbPower = snwbPower;
- bestIndexOne = snwbData[i - 2];
- bestIndexTwo = snwbData[i - 1];
- bestIndexThree = snwbData[i];
- }
- }
- }
- Console.Write($"{bestIndexOne} : {bestIndexTwo} = {maxSnwbPower} ({bestIndexThree})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement