본문 바로가기
python-algorithm

백준 20215 Cutting Corners

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

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

 

20215번: Cutting Corners

A large coffee spill in the warehouse of the Busy Association of Papercutters on Caffeine has stained the corners of all paper in storage. In order to not waste money, it was decided that these dirty corners should be cut off of all pieces of paper. A few

www.acmicpc.net

 

1
2
3
4
5
6
7
8
9
def sol(w, h):
    diagonal = (w**2+h**2)**(1/2)
    answer = w+- diagonal
    return answer
 
if __name__ == '__main__':
    w, h = map(int, input().split())
    print(sol(w, h))
 
cs
반응형

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

백준 13580 Andando no tempo  (0) 2022.12.21
백준 21335 Another Eruption  (0) 2022.12.21
백준 18409 母音を数える (Counting Vowels)  (0) 2022.12.21
백준 20352 Circus  (0) 2022.12.20
백준 15128 Congruent Numbers  (0) 2022.12.20

댓글