coding test 12

[C#] 백준 알고리즘 - 설탕 배달

문제 : 백준 알고리즘 2839번 문제 https://www.acmicpc.net/problem/2839 2839번: 설탕 배달 상근이는 요즘 설탕공장에서 설탕을 배달하고 있다. 상근이는 지금 사탕가게에 설탕을 정확하게 N킬로그램을 배달해야 한다. 설탕공장에서 만드는 설탕은 봉지에 담겨져 있다. 봉지는 3킬로그 www.acmicpc.net 풀이 : // Input int input = int.Parse(ReadLien()); // 설탕 int count = -1; // 봉지 개수 // Processing while (input > 0) { if (input % 5 == 0) { input -= 5; Count++; } else if (input % 3 == 0) { input -= 3; Count++; ..

[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개씩..