Created
April 26, 2016 08:20
-
-
Save PreSoichiSumi/05efded05cc91b948af623609f9763f9 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 sound=0; | |
sound=Math.abs(A)+Math.abs(B-A)+Math.abs(B); | |
System.out.println(sound); | |
sc.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment