[백준] 16204번 : 카드 뽑기 - Java(자바)

강재원·2022년 9월 19일
0

[코딩테스트] Java

목록 보기
49/200



https://www.acmicpc.net/problem/16204

import java.util.*;
public class Main {
    public static void main(String args[]) {
        Scanner s=new Scanner(System.in);
        int n=s.nextInt();
        int m=s.nextInt();
        int k=s.nextInt();
        System.out.print(Math.min(m,k)+Math.min(n-m,n-k));
    }
}
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글