본문 바로가기
python-algorithm

백준 21591 Laptop Sticker

by 무적김두칠 2022. 12. 20.

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

 

21591번: Laptop Sticker

The single line of input contains four integers $w_c$, $h_c$, $w_s$ and $h_s$ ($1 \le w_c, h_c, w_s, h_s \le 1,000$), where $w_c$ is the width of your new laptop computer, $h_c$ is the height of your new laptop computer, $w_s$ is the width of the laptop s

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
10
def sol(wc, hc, ws, hs):
    answer = 0
    if wc-ws >1 and hc-hs >1 :
        answer = 1
    return answer
 
if __name__ == '__main__':
    wc, hc, ws, hs = map(int, input().split())
    print(sol(wc, hc, ws, hs))
 
cs
반응형

'python-algorithm' 카테고리의 다른 글

백준 22015 金平糖 (Konpeito)  (0) 2022.12.20
백준 20673 Covid-19  (0) 2022.12.20
백준 15232 Rectangles  (0) 2022.12.20
백준 26545 Mathematics  (0) 2022.12.19
백준 26574 Copier  (0) 2022.12.19

댓글