https://www.acmicpc.net/problem/15128
1
2
3
4
5
6
7
8
9
10
|
def sol(p1, q1, p2, q2):
area = p1*p2/q1/q2/2
if area == int(area):
return 1
else:
return 0
if __name__ == '__main__':
p1, q1, p2, q2 = map(int, input().split())
print(sol(p1, q1, p2, q2))
|
cs |
부동소수점 이슈가 있으므로 아래의 글을 읽어보시길 바랍니다.
Read the content in the link
https://python.flowdas.com/tutorial/floatingpoint.html
반응형
'python-algorithm' 카테고리의 다른 글
백준 18409 母音を数える (Counting Vowels) (0) | 2022.12.21 |
---|---|
백준 20352 Circus (0) | 2022.12.20 |
백준 24860 Counting Antibodies (0) | 2022.12.20 |
백준 22015 金平糖 (Konpeito) (0) | 2022.12.20 |
백준 20673 Covid-19 (0) | 2022.12.20 |
댓글