Python 929

백준(Python) 17143번 낚시왕 풀이

Python으로 구현한 17143번 낚시왕 문제 풀이입니다. https://www.acmicpc.net/problem/17143 17143번: 낚시왕 낚시왕이 상어 낚시를 하는 곳은 크기가 R×C인 격자판으로 나타낼 수 있다. 격자판의 각 칸은 (r, c)로 나타낼 수 있다. r은 행, c는 열이고, (R, C)는 아래 그림에서 가장 오른쪽 아래에 있는 칸이다. www.acmicpc.net r, c, m = map(int, input().split()) # 위 아래 오른쪽 왼쪽 dx = [-1, 1, 0, 0] dy = [0, 0, 1, -1] result = 0 data = [[[] for _ in range(c)] for _ in range(r)] for _ in range(m) : x, y, s, ..

SWEA[D2] (Python) 1976번 시각 덧셈 풀이

Python으로 구현한 1976번 시각 덧셈 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PttaaAZIDFAUq&categoryId=AV5PttaaAZIDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) for tc in ran..

SWEA[D2] (Python) 1974번 스도쿠 검증 풀이

Python으로 구현한 1974번 스도쿠 검증 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5Psz16AYEDFAUq&categoryId=AV5Psz16AYEDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) def check_1(..

백준(Python) 12100번 2048 (Easy) 풀이

Python으로 구현한 12100번 Easy 문제 풀이입니다. https://www.acmicpc.net/problem/12100 12100번: 2048 (Easy) 첫째 줄에 보드의 크기 N (1 ≤ N ≤ 20)이 주어진다. 둘째 줄부터 N개의 줄에는 게임판의 초기 상태가 주어진다. 0은 빈 칸을 나타내며, 이외의 값은 모두 블록을 나타낸다. 블록에 쓰여 있는 수는 2 www.acmicpc.net from copy import deepcopy n = int(input()) data = [list(map(int, input().split())) for _ in range(n)] result = 0 def left(board) : for i in range(n) : p = 0 # 열의 가장 좌측 x = ..

SWEA[D2] (Python) 1970번 쉬운 거스름돈 풀이

Python으로 구현한 1970번 쉬운 거스름돈 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PsIl6AXIDFAUq&categoryId=AV5PsIl6AXIDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) money = [50..

SWEA[D2] (Python) 1966번 숫자를 정렬하자 풀이

Python으로 구현한 1966번 숫자를 정렬하자 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PrmyKAWEDFAUq&categoryId=AV5PrmyKAWEDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) for i in r..

백준(Python) 20057번 마법사 상어와 토네이도 풀이

Python으로 구현한 20057번 마법사 상어와 토네이도 문제 풀이입니다. https://www.acmicpc.net/problem/20057 20057번: 마법사 상어와 토네이도 마법사 상어가 토네이도를 배웠고, 오늘은 토네이도를 크기가 N×N인 격자로 나누어진 모래밭에서 연습하려고 한다. 위치 (r, c)는 격자의 r행 c열을 의미하고, A[r][c]는 (r, c)에 있는 모래의 양을 www.acmicpc.net n = int(input()) data = [list(map(int, input().split())) for _ in range(n)] x, y = n // 2, n // 2 dx = [0, 1, 0, -1] dy = [-1, 0, 1, 0] windx = [ # left [-1, 1, -..

SWEA[D2] (Python) 1961번 숫자 배열 회전 풀이

Python으로 구현한 1961번 숫자 배열 회전 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5Pq-OKAVYDFAUq&categoryId=AV5Pq-OKAVYDFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2 SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) def rotate..

SWEA[D2] (Python) 1959번 두 개의 숫자열 풀이

Python으로 구현한 1959번 두 개의 숫자열 문제 풀이입니다. https://swexpertacademy.com/main/code/problem/problemDetail.do?problemLevel=2&contestProbId=AV5PpoFaAS4DFAUq&categoryId=AV5PpoFaAS4DFAUq&categoryType=CODE&problemTitle=&orderBy=FIRST_REG_DATETIME&selectCodeLang=PYTHON&select-1=2&pageSize=10&pageIndex=2&&&&&&&&&& SW Expert Academy SW 프로그래밍 역량 강화에 도움이 되는 다양한 학습 컨텐츠를 확인하세요! swexpertacademy.com t = int(input()) ..

백준(Python) 23288번 주사위 굴리기 2 풀이

Python으로 구현한 23288번 주사위 굴리기 2 문제 풀이입니다. https://www.acmicpc.net/problem/23288 23288번: 주사위 굴리기 2 크기가 N×M인 지도가 존재한다. 지도의 오른쪽은 동쪽, 위쪽은 북쪽이다. 지도의 좌표는 (r, c)로 나타내며, r는 북쪽으로부터 떨어진 칸의 개수, c는 서쪽으로부터 떨어진 칸의 개수이다. 가장 왼 www.acmicpc.net from collections import deque import copy n, m, k = map(int, input().split()) data = [list(map(int, input().split())) for _ in range(n)] ball = [2, 4, 1, 3, 5, 6] # 초기 주사위 (..