Skip to content

Commit 6cad14c

Browse files
committed
Solve : 040번 문제 해결
1 parent cafd7d1 commit 6cad14c

File tree

1 file changed

+2
-2
lines changed
  • Challenge/YurinWang/040.놀이동산에_가자

1 file changed

+2
-2
lines changed

Challenge/YurinWang/040.놀이동산에_가자/solve.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ const person = 5;
2828
let count = 0;
2929
let totalWeight = 0;
3030

31-
for (let i = 0; i <= person; i++) {
31+
for (let i = 0; i < person; i++) {
3232
totalWeight = totalWeight + Number(prompt("몸무게를 입력해주세요."));
33-
if (totalWeight < limitWeight) {
33+
if (totalWeight <= limitWeight) {
3434
count++;
3535
}
3636
}

0 commit comments

Comments
 (0)