Created
April 26, 2016 07:55
-
-
Save PreSoichiSumi/ae0b4906c5f0fd6e55cf597c4d3692b4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Scanner; | |
public class Main { | |
public static void main(String[] args) { | |
Scanner sc=new Scanner(System.in); | |
int a=sc.nextInt(); | |
int b=sc.nextInt(); | |
int ap=(a+1)*b; | |
int bp=a*(b+1); | |
int res; | |
if(ap>bp){ | |
res=ap; | |
}else{ | |
res=bp; | |
} | |
System.out.println(res); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment