Skip to content

Conversation

@suyeun84
Copy link
Contributor

🧷 문제 링크

https://school.programmers.co.kr/learn/courses/30/lessons/152996

🧭 풀이 시간

20분

👀 체감 난이도

✏️ 문제 설명

놀이터에 시소가 하나 있고, 시소의 중심으로부터 2, 3, 4 거리의 지점에 좌석이 하나씩 있을 때,
시소를 두 명이 마주 보고 탄다고 할 때, 시소가 평형인 상태를 이룰 수 있는 두 사람을 시소 짝꿍이라고 한다.
탐승한 사람의 무게 x 좌석 간 거리 가 같아야함
시소 짝꿍이 몇 쌍 존재하는지 구하기

🔍 풀이 방법

HashMap 사용
한 사람이 2,3,4 각각의 자리에 앉았을 때 필요한 시소 짝꿍의 무게를 HashMap에 넣어두고, 해당하는 사람이 존재하면 answer를 늘려줌

⏳ 회고

쉬움

@suyeun84 suyeun84 self-assigned this Sep 11, 2025
@suyeun84 suyeun84 added the success 👍 해설을 보지 않고 풀었을 때 label Sep 11, 2025
@suyeun84 suyeun84 merged commit d14d591 into main Sep 11, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

success 👍 해설을 보지 않고 풀었을 때

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants