일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- 8기
- 네이버 부스트 코스
- 백준 #baekjoon # 2563
- 웹/모바일
- Virtual Box 7.0.6
- 후기
- id # tr # 환경변수
- 부스트캠프
- 운영체제론
- 보기 편하라고 만든
- 네이버
- Ubuntu 20.04
- Today
- Total
목록Python (13)
Miner
if 속에 있는 cnt = 0(7번째 줄) 과 23번 째 줄 로 고침 왜 네임에러 가 생길까 cnt 와 repeat의 다른점? https://www.acmicpc.net/problem/1652 1652번: 누울 자리를 찾아라 첫째 줄에 방의 크기 N이 주어진다. N은 1이상 100이하의 정수이다. 그 다음 N줄에 걸쳐 N개의 문자가 들어오는데 '.'은 아무것도 없는 곳을 의미하고, 'X'는 짐이 있는 곳을 의미한다. www.acmicpc.net
보호되어 있는 글입니다.
>> 처음 코드 import sys a, b = list(map(int, sys.stdin.readline().split())) arr =[ list(map(int, sys.stdin.readline().split())) for i in range(a) ] for p in range(len(arr)): arr[p] = str(arr[p]) ma_x = min(a,b) cnt = 0 mybreak = True while ma_x > 1: for i in range(a - ma_x +1): for j in range(b - ma_x +1): if arr[i][j] == arr[i + ma_x -1][j] and arr[i][j] == arr[i][j + ma_x -1] and arr[i][j] == arr[..
import sys a, b = list(map(int, sys.stdin.readline().split())) arr = [ i for i in range(a, b+1)] i = a while i > 에라토스테네스의 체 https://freedeveloper.tistory.com/392 [이것이 코딩 테스트다 with Python] 38강 에라토스테네스의 체 https://www.youtube.com/watch?v=9rLFFKmKzno&list=PLVsNizTWUw7H9_of5YCB0FmsSc-K44y81&index=38 다수의 소수 판별 하나의 수에 대해서 소수인지 아닌지 판별하는 방법을 알아보았다 하지만 특정한 수의 범위 안에 존재하 freedeveloper.tistory.com 소수인지 검사할때 ..
>> 두 코드의 차이 원래 코드 import sys n = int(sys.stdin.readline()) arr = [ tuple(map(int, sys.stdin.readline().split())) for i in range(n) ] #print(arr) color = [[0] * 100] * 100 #print(color) # (3,7) 들어가면 3-13 7-17 def colored(a,b): for i in range(a,a+10): for j in range(b,b+10): color[i][j] = 1 for i in arr: colored(i[0],i[1]) cnt = 0 for i in range(100): for j in range(100): if color[i][j] == 1: cnt ..