전체 글
-
[Java 자바] 프로그래머스 Lv 0 - 나머지 구하기Study/Java 2024. 9. 28. 14:49
코딩테스트 연습 | 프로그래머스 스쿨개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요!school.programmers.co.kr 목차문제 설명입출력 예시문제 풀이 1. 문제 설명 문제 설명정수 num1, num2가 매개변수로 주어질 때, num1를 num2로 나눈 나머지를 return 하도록 solution 함수를 완성해주세요. 제한사항0 num1 ≤ 1000 num2 ≤ 100 2. 입출력 예시 입출력 예시#1 num1이 3, num2가 2이므로 3을 2로 나눈 나머지 1을 return 합니다. #2num1이 10, num2가 5이므로 10을 5로 나눈 나머지 0을 ret..
-
[Flutter 플러터] Lotto 프로그램 만들기 (중복 제외, 오름차순 정렬까지)Study/Flutter, Dart 2024. 9. 27. 15:46
Lotto 프로그램 import 'dart:math';List lottoNumber(){ List lottoList = []; var num; for(int i = 0; i myNumber(){ List myList = []; var num; for(int i = 0; ilottoFinal = lottoNumber(); ListmyFinal = myNumber(); checkNumber(lottoFinal, myFinal);} 1. lottoNumber(), myNumber() 함수를 만들어서 정수형 리스트를 반환한다. 2. for문을 사용하여, 1~45중 랜덤하게 뽑아, lottoList, myList에 넣는다. 3. checkNumber 함수를 통해 lottoList의 각 번호와 ..
-
[Java 자바] 프로그래머스 Lv 0 - 배열 두 배 만들기Study/Java 2024. 9. 27. 11:31
코딩테스트 연습 | 프로그래머스 스쿨개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요!school.programmers.co.kr 목차문제 설명입출력 예시문제 풀이 1. 문제 설명 문제 설명정수 배열 numbers가 매개변수로 주어집니다. numbers의 각 원소에 두배한 원소를 가진 배열을 return하도록 solution 함수를 완성해주세요. 제한사항-10,000 ≤ numbers의 원소 ≤ 10,0001 ≤ numbers의 길이 ≤ 1,000 2. 입출력 예시 입출력 예시#1 [1, 2, 3, 4, 5]의 각 원소에 두 배를 한 배열 [2, 4, 6, 8, 10]을 re..
-
[Java 자바] 프로그래머스 Lv 0 - 분수의 덧셈Study/Java 2024. 9. 26. 13:34
코딩테스트 연습 | 프로그래머스 스쿨개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요!school.programmers.co.kr 목차문제 설명입출력 예시문제 풀이 1. 문제 설명 문제 설명첫 번째 분수의 분자와 분모를 뜻하는 numer1, denom1, 두 번째 분수의 분자와 분모를 뜻하는 numer2, denom2가 매개변수로 주어집니다. 두 분수를 더한 값을 기약 분수로 나타냈을 때 분자와 분모를 순서대로 담은 배열을 return 하도록 solution 함수를 완성해보세요. 제한사항0 ≤ numer1, denom1, numer2, denom2 ≤ 100 2. 입출력 예시 ..
-
[Java 자바] 프로그래머스 Lv 0 - 숫자 비교하기Study/Java 2024. 9. 25. 10:57
코딩테스트 연습 | 프로그래머스 스쿨개발자 취업의 필수 관문 코딩테스트를 철저하게 연습하고 대비할 수 있는 문제를 총망라! 프로그래머스에서 선발한 문제로 유형을 파악하고 실력을 업그레이드해 보세요!school.programmers.co.kr 목차문제 설명입출력 예시문제 풀이 1. 문제 설명 문제 설명정수 num1, num2가 매개변수로 주어질 때, 두 수가 같으면 1, 다르면 -1을 return 하도록 solution 함수를 완성하라. 제한사항0 ≤ num1 ≤ 10,0000 ≤ num2 ≤ 10,000 2. 입출력 예시 입출력 예시#1 num1이 2이고 num2가 3이므로 다릅니다. 따라서 -1을 return합니다. #2num1이 11이고 num2가 11이므로 같습니다. 따라서 1을..