Skip to content

Commit

Permalink
Update 2023.12.30
Browse files Browse the repository at this point in the history
  • Loading branch information
SoulTree-Lovers committed Dec 30, 2023
1 parent 8c08104 commit e4cea4b
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Silver_I/1105.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 팔

L, R = input().split()

def solution(L, R):
if len(L) != len(R):
return 0

min_value = 0

for i in range(len(L)):
if L[i] == R[i]: # and L[i] == '8' 로 묶으면 첫 번째 조건문 false 시 즉시 break하여 끝까지 탐색하지 못함.
if L[i] == '8':
min_value += 1
else:
pass
else:
break

return min_value


print(solution(L, R))

0 comments on commit e4cea4b

Please sign in to comment.