백준 BAEKJOON 34543번 와우산 스탬프 투어 [PYTHON/파이썬]

문제 출처 (BRONZE Ⅳ)

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

 

 

 

 

 

 

풀이

문제의 조건에 맞게 순차적으로 if 문을 사용하여 투어 점수를 계산했다.

 

 

 

 

 

 

코드

N = int(input())
W = int(input())
result = N * 10

if N >= 3:
    result += 20

if N == 5:
    result += 50

if W > 1000:
    result -= 15

print(result if result > 0 else 0)