코테 4

[C#] 프로그래머스 알고리즘 - 숫자 정렬

문제 : 프로그래머스 https://programmers.co.kr/skill_checks/369129?challenge_id=947 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 풀이 : using System; using System.Collections.Generic; using System.Linq; public class Solution { public long solution(long n) { long answer = 0; char[] a = n.ToString().ToCharArray(); Array.Sort(a); Array.Reverse(..

[Python] - Coding Test / 6097 문제

✍ CodeUp 문제 / 출처 : Codeup 👉 Input → 👉 Output → 👉 Source Code h, w = map(int, input().split()) n = int(input()) grid = [list(0 for _ in range(w)) for _ in range(h)] for i in range(n): l , d, x, y = map(int, input().split()) x -= 1 y -= 1 # 가로 if d == 0: for j in range(l): grid[x][y + j] = 1 else: for j in range(l): grid[x + j][y] = 1 for i in range(h): print(*grid[i]) # * 연산자 사용하여 list 형태 없애고 1개씩..