Skip to content

Latest commit

ย 

History

History
43 lines (39 loc) ยท 914 Bytes

README.md

File metadata and controls

43 lines (39 loc) ยท 914 Bytes

๐ŸŒˆ algorithm

  • ์•Œ๊ณ ๋ฆฌ์ฆ˜ ๋ฌธ์ œ๋ฅผ ํ‘ธ๋Š” ์ €์žฅ์†Œ์ž…๋‹ˆ๋‹ค.

์ž…๋ ฅ ํŒ

  • ์ •์ˆ˜ํ˜• 2๊ฐœ ์ž…๋ ฅ ๋ฐ›๊ธฐ
a,b = map(int, input().split())
  • ์ •์ˆ˜ํ˜• n๊ฐœ ์ž…๋ ฅ ๋ฐ›๊ธฐ
arr = list(map(int,input().split()))
  • ์ •์ˆ˜ํ˜• 2๊ฐœ ์ž…๋ ฅ ๋ฐ›๊ธฐ (์ข€ ๋” ๋น ๋ฅด๊ฒŒ ์ž…๋ ฅ๋ฐ›๊ธฐ)
import sys
n, m = map(int, sys.stdin.readline().split())
  • 2์ฐจ์› ๋ฆฌ์ŠคํŠธ ์ž…๋ ฅ ๋ฐ›๊ธฐ
board = [list(map(int, sys.stdin.readline().split())) for _in range(n)]
  • ๋ฌธ์ž์—ด ์ž…๋ ฅ ๋ฐ›๊ธฐ
text = sys.stdin.readline().rstrip()

๋ฐฐ์—ด ํŒ

  • 1์ฐจ์› ๋ฐฐ์—ด ์ดˆ๊ธฐํ™”
rows = 10
arr = [0] * rows
  • 2์ฐจ์› ๋ฐฐ์—ด ์ดˆ๊ธฐํ™”
rows = 10
cols = 5
arr = [[0 for j in range(cols)] for i in range(rows)]

์ฐธ๊ณ  ๋ ˆํผ๋Ÿฐ์Šค