1.
백준 2750번: 수 정렬하기
n = int(input())
array = []
for i in range(n):
array.append(int(input()))
array.sort()
for i in range(n):
print(array[i])
2.
백준 4673번: 셀프 넘버
num = [0] * 10001
def makeNum(n):
result = n
while n>= 10:
result += (n % 10)
n = (n // 10)
return (result + n)
for i in range(100001):
ino = makeNum(i)
if ino < 10001:
num[ino] = 1
for i in range(10001):
if num[i] == 0:
print(i)
3.
백준 1316번: 그룹 단어 체커
n = int(input())
array = []
for i in range(n):
array.append(input())
def isGroup(st):
ar = []
flag = 0
for i in range(len(st)-1):
if st[i] != st[i+1]:
if st[i+1] in ar:
flag = 1
break
ar.append(st[i])
if flag:
return 0
else:
return 1
count = 0
for i in array:
count += isGroup(i)
print(count)