[백준] 2231번: 분해합 - JAVA
·
알고리즘
[작성일: 2023. 10. 12] https://www.acmicpc.net/problem/2231 풀이import java.util.Scanner;public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); boolean check = true; for (int i = 0; i 0) { sum += num % 10; num /= 10; } if (sum + i == n) { ..