[백준] 1065번 : 한수 - Python(파이썬)

강재원·2022년 10월 19일
0

[코딩테스트] Python

목록 보기
130/200



https://www.acmicpc.net/problem/1065

x=int(input())
count=99
if x<100:
    print(x)
else:
    for i in range(100,x+1):
        a=i%10
        b=int(i/10)%10
        c=int(int(i/10)/10)
        if c-b==b-a:
            count+=1
    print(count)
profile
개념정리 & 문법 정리 & 알고리즘 공부

0개의 댓글