๋์ ์ฝ๋ T = int(input()) for t in range(1, T + 1): arr = list(map(int,input().split())) cnt = [0]*101 result = 0 for x in arr: cnt[x] += 1 for i in range(len(cnt)): if cnt[i] ==1 or cnt[i] ==3 : result = i print("#"+str(t) , result) ์ ๋ ฅ๋ฐ์ ์๋ฅผ ์นด์ดํ ํ๋ค. ์ง์ง ๋ฉ์ฒญํ๊ฒ ํ์๋ค. ์ฝ๋ ์์ T = int(input()) for t in range(1, T + 1): arr = list(map(int,input().split())) arr.sort() result = 0 if arr[0] == arr[1]: result = a..
๋์ ์ฝ๋ from collections import deque for _ in range(1, 11): t = int(input()) arr = list(map(int,input().split())) deq = deque(arr) while 0 not in deq: for i in range(1,6): tmp = deq.popleft() if tmp-i
๊ฐ์ฅ ๊ธด ํ๋ฌธ์ ๊ธธ์ด๋ฅผ ๊ตฌํ๋ ๋ฌธ์ ๋์ ์ฝ๋ for _ in range(10): t = int(input()) arr = [] result = 0 for _ in range(100): arr.append(input()) for i in range(100): b = [x[i] for x in arr] for j in range(100): for length in range(1,101): if j+length > 100: break tmp1 = arr[i][j:j+length] tmp2 = b[j:j+length] if tmp1 == tmp1[::-1] and length > result: result = length if tmp2 == tmp2[::-1] and length > result: result..
๋์ ์ฝ๋ for t in range(1,11): length = int(input()) arr = [] cnt = 0 for _ in range(8): arr.append(input()) for j in range(8): b = [i[j] for i in arr] for i in range(0,9-length): if list(arr[j][i:length+i]) == list(reversed(arr[j][i:length+i])): cnt += 1 if list(b[i:length+i]) == list(reversed(b[i:length+i])): cnt += 1 print("#"+str(t) , cnt) 2์ฐจ์ ๋ฐฐ์ด์์ ํ ์ถ๋ ฅํ๊ธฐ a = [ [0, 1], [2, 3], [4, 5], [6, 7], [..