From dd84813459bad82a28785cdee6152d43af93eb65 Mon Sep 17 00:00:00 2001 From: rl544 <111494264+rl544@users.noreply.github.com> Date: Sat, 17 Dec 2022 22:11:31 +0900 Subject: [PATCH] =?UTF-8?q?uploaded=20at=202022.=2012.=2017.=20=EC=98=A4?= =?UTF-8?q?=ED=9B=84=2010:11:32?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../x만큼 간격이 있는 n개의 숫자/solution.java | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 programmers/x만큼 간격이 있는 n개의 숫자/solution.java diff --git a/programmers/x만큼 간격이 있는 n개의 숫자/solution.java b/programmers/x만큼 간격이 있는 n개의 숫자/solution.java new file mode 100644 index 0000000..f79c91d --- /dev/null +++ b/programmers/x만큼 간격이 있는 n개의 숫자/solution.java @@ -0,0 +1,11 @@ +// [문제 링크]: https://school.programmers.co.kr/learn/courses/30/lessons/12954?language=java + +class Solution { + public long[] solution(int x, int n) { + long[] answer = new long[n]; + for(int a = 0; a < n; a++){ + answer[a] = (long) x*(a+1); + } + return answer; + } +} \ No newline at end of file