문제 링크입니다: www.acmicpc.net/problem/15128
15128번: Congruent Numbers
Each input will consist of a single test case. Note that your program may be run multiple times on different inputs. Each test case will consist of a single line with four integers p1, q1, p2 and q2 (1 ≤ p1,q1,p2,q2 ≤ 100,000) where p1/q1 and p2/q2 are
www.acmicpc.net
삼각형의 넓이가 정수라는 것은 결국 (p1 * p2)≡(q1 * q2 * 2) 결과가 0을 의미합니다.
개발환경:Visual Studio 2017
지적, 조언, 질문 환영입니다! 댓글 남겨주세요~
반응형
'알고리즘 > BOJ' 카테고리의 다른 글
백준 15474번 鉛筆 (0) | 2021.03.22 |
---|---|
백준 15236번 Dominos (0) | 2021.03.21 |
백준 15080번 Every Second Counts (0) | 2021.03.19 |
백준 15059번 Hard choice (0) | 2021.03.19 |
백준 15051번 Máquina de café (0) | 2021.03.19 |