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

YB·2026년 5월 9일
post-thumbnail

링크텍스트

설명

풀이 흐름 설명

시간복잡도: O(1), 공간복잡도: O(1)

회독

  • [ x ] 1회
  • 2회
  • 3회

코드

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

class Solution
{
	public static void main(String args[]) throws Exception
	{

		Scanner sc = new Scanner(System.in);
		
        int P=sc.nextInt();
		int K=sc.nextInt();
        	
        System.out.println(P-K+1);
	}
}

profile
안녕하세요

0개의 댓글