블랙잭 (1) 썸네일형 리스트형 [백준/2798번/java] - 블랙잭 import java.util.Scanner; public class boj_2798 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int M = scan.nextInt(); int[] list = new int[N]; for(int i = 0; i < N; i++){ list[i] = scan.nextInt(); } int first = 0; int second = 1; int third = 2; int result = 0; while(first < N-2){ int sum = list[first] + list[second] + list[third]; if( s.. 이전 1 다음