본문 바로가기
Beakjoon&프로그래머스/Java

[백준/Java] 6749번 Next in line

by 현장 2022. 4. 11.

-Code

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		int kid1 = sc.nextInt();
		int kid2 = sc.nextInt();
		System.out.println(kid2 * 2 - kid1);

 	}	
}