[Programmers] 크기가 작은 부분문자열
Python
def solution(t, p):
answer = 0
for i in range(len(t) - len(p) + 1):
temp = ""
for j in range(len(p)):
temp += t[i + j]
if int(temp) <= int(p):
answer += 1
return answer
댓글남기기