Physical Address
304 North Cardinal St.
Dorchester Center, MA 02124
In a recent breakthrough in mathematics, the proof utilized a concept called Height
.
Consider a fraction \frac{a}{b}ba. Its Height
is defined as the maximum of its numerator and denominator. So, for example, the Height
of \frac{3}{19}193 would be 1919, and the Height
of \frac{27}{4}427 would be 2727.
Given aa and bb, find the Height
of \frac{a}{b}ba.
The only line of input contains two integers, aa and bb.
Output a single integer, which is the Height
of \frac{a}{b}ba.
Input: 3 19
Output: 19
The maximum of \{3, 19\}{3,19} is 1919. Hence the Height
of \frac{3}{19}193 is 1919.
Input: 27 4
Output: 27
The maximum of \{27, 4\}{27,4} is 2727. Hence the Height
of \frac{27}{4}427 is 2727.
/* package codechef; // don't place package name! */
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be "Main" only if the class is public. */
class Codechef
{
public static void main (String[] args) throws java.lang.Exception
{
Scanner sc = new Scanner(System.in);
int a = sc.nextInt();
int b = sc.nextInt();
System.out.println(Math.max(a,b));
// your code goes here
}
}
#include <iostream>
using namespace std;
int main() {
int a,b;
cin>>a;
cin>>b;
if(a>b)
cout<<a;
else if(b>a)
cout<<b;
// your code goes here
return 0;
}
a,b=map(int,input().split())
if a>=b:
print(a)
else:print(b)
In our experience, we suggest you solve this Height of Rationals CodeChef Solution and gain some new skills from Professionals completely free and we assure you will be worth it.
If you are stuck anywhere between any coding problem, just visit Queslers to get the Height of Rationals CodeChef Solution
I hope this Height of Rationals CodeChef Solution would be useful for you to learn something new from this problem. If it helped you then don’t forget to bookmark our site for more Coding Solutions.
This Problem is intended for audiences of all experiences who are interested in learning about Data Science in a business context; there are no prerequisites.
Keep Learning!
More Coding Solutions >>