일곱난쟁이1 [알고리즘 풀이] 일곱난쟁이 / 백준 2309 / C++ #include using namespace std;// 난쟁이 7명의 키의 합 : 100// 아홉개의 줄에 난쟁이 9명의 키가 입력// 7명의 난쟁이를 찾아 키를 오름차순으로 출력하라 // 가능한 답이 여러개일 경우 아무거나 정답int a[9];int main(){ ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); for(int i=0; i> a[i]; } sort(a, a+9); do{ int sum = 0; for(int i=0; i 2025. 1. 10. 이전 1 다음