백준 #31280번 ФАКИР

jhj·2024년 2월 24일

백준 JAVA

목록 보기
428/583
import java.util.Arrays;
import java.util.Scanner;
public class Main {
	public static void main(String[] args) {
		
		Scanner sc = new Scanner(System.in);
		
		int[] a = new int[4];
		for(int i = 0; i < a.length; i++) {
			a[i] = sc.nextInt();
		}
		Arrays.sort(a);
		
		int total = 0;
		for(int i = 1; i < a.length; i++) {
			total += a[i];
		}
		total += 1;
		System.out.println(total);
		sc.close();
	}
}
profile
개발자를 꿈꾸는

0개의 댓글