프로그래머스

프로그래머스/Lv.1

Lv.1 행렬의 덧셈

https://programmers.co.kr/learn/courses/30/lessons/12950 코딩테스트 연습 - 행렬의 덧셈 행렬의 덧셈은 행과 열의 크기가 같은 두 행렬의 같은 행, 같은 열의 값을 서로 더한 결과가 됩니다. 2개의 행렬 arr1과 arr2를 입력받아, 행렬 덧셈의 결과를 반환하는 함수, solution을 완성해주세요 programmers.co.kr 기본틀 class Solution { public int[][] solution(int[][] arr1, int[][] arr2) { int[][] answer = {}; return answer; } } 첫번째 시도 class Solution { public int[][] solution(int[][] arr1, int[][] a..

프로그래머스/Lv.1

Lv.1 x만큼 간격이 있는 n개의 숫자

https://programmers.co.kr/learn/courses/30/lessons/12954 코딩테스트 연습 - x만큼 간격이 있는 n개의 숫자 함수 solution은 정수 x와 자연수 n을 입력 받아, x부터 시작해 x씩 증가하는 숫자를 n개 지니는 리스트를 리턴해야 합니다. 다음 제한 조건을 보고, 조건을 만족하는 함수, solution을 완성해주세요. programmers.co.kr 기본틀 class Solution { public long[] solution(int x, int n) { long[] answer = {}; return answer; } } 첫번째 시도 class Solution { public long[] solution(int x, int n) { long[] answe..

프로그래머스/Lv.1

Lv.1 직사각형 별찍기

https://programmers.co.kr/learn/courses/30/lessons/12969 코딩테스트 연습 - 직사각형 별찍기 이 문제에는 표준 입력으로 두 개의 정수 n과 m이 주어집니다. 별(*) 문자를 이용해 가로의 길이가 n, 세로의 길이가 m인 직사각형 형태를 출력해보세요. 제한 조건 n과 m은 각각 1000 이하인 자연수 programmers.co.kr 첫번째 시도 import java.util.Scanner; class Solution { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = sc.nextInt(); int b = sc.nextInt(); for(int i = 0; ..

코딩하는토끼
'프로그래머스' 카테고리의 글 목록 (5 Page)