본문 바로가기

Algorithm/SWEA

[SWEA] 2043. 서랍의 비밀번호 D1 JAVA

반응형


문제 이해

 

아이디어

 

코드

import java.util.Scanner;
import java.io.FileInputStream;

class Solution
{
	public static void main(String args[]) throws Exception
	{
		Scanner sc = new Scanner(System.in);
		String[] str = sc.nextLine().split(" ");
		int p = Integer.parseInt(str[0]);
		int k = Integer.parseInt(str[1]);
		sc.close();
		
		System.out.println(p-k+1);
	}
}

 

 


 

 

집사는개발자가되고파

 

choppadontbiteme.tistory.com

 

반응형