전체 글658 백준10845 c# https://www.acmicpc.net/problem/10845using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Collections.Generic;namespace 백준{ internal class 백준_10845 { static void Main(string[] args) { int num = int.Parse(Console.ReadLine()); //첫째 줄에 주어지는 명령의 수 Queue queue = new Queue(); //Q생성 for .. 2025. 4. 14. 백준 9613번 Python https://www.acmicpc.net/problem/9613 import sysimport mathn=int(input())#첫째 줄에 테스트 케이스의 개수for i in range(n): #테스트 케이스 수만큼 반복복 arr=list(map(int, sys.stdin.readline().split())) #입력받은 수를 int형으로 split하여 arr list 안에 넣어줌줌 total=0 # 합계값 초기화화 for j in range(1,len(arr)): #배열의 1번째 index부터 반복복 for k in range(j+1,len(arr)): # j index에 해당하는 수와 j + 1 를 index로 하여 k에 넣어주기기 total+=mat.. 2025. 3. 17. 백준 9613 Python 9613번: GCD 합import sysimport mathn = int(input()) #첫째줄에 테스트 케이스 힙력for i in range(n): #테스트 개수 만큼 반복 arr=list(map(int, sys.stdin.readline().split())) #한줄씩 분리 total=0 for j in range(1,len(arr)): #1번째 index부터 시작 for k in range(j+1,len(arr)): # j+1 index부터 시작 total+=math.gcd(arr[j],arr[k]) #math.gcd 최대공약수를 구하는 함수 print(total)[python] 파이썬 최대공약수, 최소공배수 함수 (gcd, lcm) [pytho.. 2025. 1. 30. 가장 큰 물고기 10마리 구하기 코딩테스트 연습 - 가장 큰 물고기 10마리 구하기 | 프로그래머스 스쿨 프로그래머스SW개발자를 위한 평가, 교육, 채용까지 Total Solution을 제공하는 개발자 성장을 위한 베이스캠프programmers.co.kr SELECT ID, LENGTH ID LENGTH 출력FROM FISH_INFO ORDER BY IFNULL(LENGTH,10) DESC, ID 길이가 10 이하인 물고기는 없음 길이가같은 물고기면 ORDER BY 오름차순LIMIT 10 데이터 10개만 들고오기 2025. 1. 27. 이전 1 2 3 4 ··· 165 다음