파이톨치

[백준] 1105 파이썬, pyhton 본문

알고리즘

[백준] 1105 파이썬, pyhton

파이톨치 2023. 3. 3. 11:16
728x90
start, end = map(int, input().split())

a = end - start

answer = 0
k = 0
while(1):
  # print(a, 10**k, int(start/(10**k))% 10)
  if a > 10 ** k:
    k += 1
  else:
    if int(start/(10**k))%10 == 8:
      if int((start+a)/(10**k))%10 == 8:
        answer += 1
    k += 1
    if 10 ** k > end:
      break

print(answer)
728x90

'알고리즘' 카테고리의 다른 글

[백준/BOJ] 2559 수열  (0) 2023.01.12
[BOJ/백준] 9251 LCS  (0) 2023.01.03
[알고리즘] Tree  (1) 2022.10.08
[알고리즘] 알고리즘 기초  (0) 2022.10.08
Greedy Algorithm : 1449 수리공 상승  (0) 2022.09.02