Skip to content

Instantly share code, notes, and snippets.

@johirbuet
Created February 27, 2018 18:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save johirbuet/82466be8bb71d22a96ecbc298c921664 to your computer and use it in GitHub Desktop.
Save johirbuet/82466be8bb71d22a96ecbc298c921664 to your computer and use it in GitHub Desktop.
import java.util.Scanner;
public class UVA12952 {
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNextInt()) {
int A = sc.nextInt();
int B = sc.nextInt();
if(A == B) {
System.out.println(A);
}else {
System.out.println(Math.max(A, B));
}
}
sc.close();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment