파이썬 문제풀이(17)
-
[Python 문제풀이] 19일차 (끝)
Day 19 Q25. Minesweeper In the popular Minesweeper game you have a board with some mines and those cells that don't contain a mine have a number in it that indicates the total number of mines in the neighboring cells. Starting off with some arrangement of mines we want to create a Minesweeper game setup. 제출 코드 import numpy as np def minesweeper(matrix): import numpy as np def minesweeper(mat..
2020.07.27 -
[Python 문제풀이] 18일차
Day_18 Intro Q24. Mindsweeper In the popular Minesweeper game you have a board with some mines and those cells that don't contain a mine have a number in it that indicates the total number of mines in the neighboring cells. Starting off with some arrangement of mines we want to create a Minesweeper game setup. 알고리즘 고민, 및 러프한 코드 작성 중! 작성 흐름 # Test case import numpy as np matrix = [[True, Fals..
2020.07.26 -
[Python 문제풀이] 17일차
Day_17 Intro Q23. Box Blur Last night you partied a little too hard. Now there's a black and white photo of you that's about to go viral! You can't let this ruin your reputation, so you want to apply the box blur algorithm to the photo to hide its content. The pixels in the input image are represented as integers. The algorithm distorts the input image in the following way: Every pix..
2020.07.25 -
[Python 문제풀이] 16일차
Day_16 Intro Q22. avoidObstacles You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal length of the jump enough to avoid all the obstacles. 제출 코드 def avoidObstacles(inputArra..
2020.07.24 -
[Python 문제풀이] 15일차
Day_15 Intro Q22. avoidObstacles You are given an array of integers representing coordinates of obstacles situated on a straight line. Assume that you are jumping from the point with coordinate 0 to the right. You are allowed only to make jumps of the same length represented by some integer. Find the minimal length of the jump enough to avoid all the obstacles. 제출 코드 from math import gcd def sol..
2020.07.23 -
[Python 문제풀이] 14일차
Day_14 Intro Q21. isIPv4Address An IP address is a numerical label assigned to each device (e.g., computer, printer) participating in a computer network that uses the Internet Protocol for communication. There are two versions of the Internet protocol, and thus two versions of addresses. One of them is the IPv4 address. 제출 코드 def isIPv4Address(inputString): inputDivide = inputString.split('...
2020.07.22