성능 요약
- 
    
메모리: 96 MB, 시간: 8.00 ms - Answer Code1
 - 
    
메모리: 78.1 MB, 시간: 0.04 ms - Answer Code2
 
구분
코딩테스트 연습 > 연습문제
Answer Code1
class Solution {
    public long[] solution(int x, int n) {
        long[] answer = new long[n];
        long ans = x;
        
        for(int i = 0; i< n; i++) {
            answer[i] = ans;
            ans += x;
        }
        for(int i = 0; i < n; i++) {
            System.out.print(answer[i]);   
        }
        return answer;
    }
}
Answer Code2
import java.util.*;
class Solution {
    public static long[] solution(int x, int n) {
        long[] answer = new long[n];
        answer[0] = x;
        for (int i = 1; i < n; i++) {
            answer[i] = answer[i - 1] + x;
        }
        return answer;
    }
}