Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- namespace ConsoleApp3
- {
- class Program
- {
- static void Main(string[] args)
- {
- var n = int.Parse(Console.ReadLine());
- int sbV = 1;
- int A=0, B=0, C=0, SBV=1;
- for(int i =1; i<=n; i++)
- {
- var a = int.Parse(Console.ReadLine());
- var b = int.Parse(Console.ReadLine());
- var c = int.Parse(Console.ReadLine());
- int x = (a / b);
- for( int j = 1; j<=c; j++) sbV*=x;
- if(sbV>=SBV)
- {
- A=a;
- B=b;
- C=c;
- SBV=sbV;
- }
- sbV=1;
- }
- Console.WriteLine($"{A} : {B} = {SBV} ({C})");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement