250x250
Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 1101
- 그리디 알고리즘
- 가상환경
- 재귀
- 파이싼
- 손실함수
- end to end
- 실버
- 경사하강법
- pyenv
- streamlit
- 15649
- Mac
- 파이썬
- 백준
- 설정
- 4948
- 신경망 학습
- 밑바닥부터 시작하는 딥러닝
- 백트래킹
- 1002
- 기계학습
- Python
- 9020
- n과 m
- BOJ
- 개발환경
- N-Queen
Archives
- Today
- Total
파이톨치
[백준] 1105 파이썬, pyhton 본문
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 |