> For the complete documentation index, see [llms.txt](https://heunnajo.gitbook.io/algorithms-problem-solving-skills/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://heunnajo.gitbook.io/algorithms-problem-solving-skills/brute-force/one-two-three-plus-recursive-solution.md).

# One Two Three plus - Recursive Solution

문제 복기

문제 설명

![](https://3269900549-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MIbwNq54Ge4eqsziHM7%2F-MaTewj44LdbZumvvMdN%2F-MaTl0FQarbkj40tmXtw%2FScreen%20Shot%202021-05-24%20at%2011.24.54%20PM.png?alt=media\&token=be1815d8-3460-40b6-b1dd-6109e3fba672)

**입, 출력 테크닉**\
TC 수가 주어지고, TC만큼 정수 1개씩 입력받아 각각의 정수에 대한 정답을 출력해야할 때.

**기존의 코드**

```java
int[] num = new int[n];
for(int i=0;i<n;i++) {
    num[i] = sc.nextInt();
}
for(int i=0;i<n;i++) {
    System.out.println(go(num[i],0));
}
```

다음의 코드에서 훨신 간결하고 가독성 좋은 것을 느낄 수 있다.

```java
int t = sc.nextInt();
while(t-- >0){
    int n = sc.nextInt();
    System.out.println(go(n,0));
}
```
