전체 글439 백준 1547 파이썬 location=[0,1,0,0]num = int(input())for i in range(num): a,b = map(int, input().split(" ")) if location[a] == 1 or location[b] == 1: temp = location[a] location[a] = location[b] location[b] = tempprint(location.index(1)) 2018. 11. 13. 백준 10219 파이썬 count = int(input())for j in range(count): h,w = map(int, input().split()) for i in range(h): a = input() b=w-1 while b>=0: print(a[b],end="") b=b-1 print() 2018. 11. 12. 백준 1024 파이썬 N,L = map(int,input().split())x=-1y=-1for i in range(L,101): t = (i-1)*i//2 if ((N-t)%i == 0) & ((N-t)//i>=0): x = (N-t)//i y = i breakif x==-1: print(-1)else: for i in range(0,y): print(x+i,end = " ") 2018. 11. 12. 백준 1057 파이썬 num, kim, im = map(int, input().split())count=0flag =1while num!=1: count=count+1 num = num/2 kim = (kim +1)//2 im = (im +1) //2 if kim == im: print(count) flag=0 breakif flag == 1: print(-1) 2018. 11. 6. 이전 1 ··· 91 92 93 94 95 96 97 ··· 110 다음