Created
July 15, 2017 04:10
-
-
Save chanjungkim/b09f64c1d96463eb8a2080a9163a54f1 to your computer and use it in GitHub Desktop.
2965 Kangaroo
This file contains 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; | |
class Main{ | |
static long[][] d = new long[15][15]; | |
public static void main(String[] args){ | |
Scanner sc = new Scanner(System.in); | |
int a = sc.nextInt(); int b =sc.nextInt(); int c=sc.nextInt(); | |
int s1, s2; | |
s1=b-a; s2=c-b; | |
if(s1>s2){ | |
System.out.println(s1-1); | |
}else{ | |
System.out.println(s2-1); | |
} | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment