![](https://img1.daumcdn.net/thumb/R750x0/?scode=mtistory2&fname=https%3A%2F%2Fblog.kakaocdn.net%2Fdn%2FbsE1qG%2Fbtsg0u5BXSg%2FSkhrMfHG5gLkZV2mmGIuTk%2Fimg.png)
백준 2798번 블랙잭
·
알고리즘
package algorithm; import java.util.Scanner; public class algo_2798 { public static void main(String[] args) { // TODO Auto-generated method stub Scanner sc = new Scanner(System.in); int n = sc.nextInt(); //카드개수 int m = sc.nextInt(); // 계산 최대값 int[] arr = new int[n]; // 들어 가는 갯수를 배열에 넣어주고 for (int i = 0; i < n; i++) { arr[i] = sc.nextInt(); } // 그 수만큼 입력 받아 int result = 0; int temp = 0; for (int..