본문 바로가기
코테/백준(Phython)

18108 입력값에 조건 주기

by Wanado 2022. 8. 19.
728x90

phython

a=0
while(a==0):
    b = int(input())
    if b < 1000 or b > 3000:
        print("잘못입력")  
    else:
        print(b-543)
        a=1

**들여쓰기 주의하자

 

if문

https://wikidocs.net/20#and-or-not

type 변환

https://codechacha.com/ko/python-convert-string-to-integer/

728x90

'코테 > 백준(Phython)' 카테고리의 다른 글

9498 시험점수  (0) 2022.08.23
10926 ??!  (0) 2022.08.21
1008 A/B , 3003  (0) 2022.08.21
2557 Hello World 출력  (0) 2022.08.19