Skip to content

Commit

Permalink
피자 나눠 먹기(2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudwns committed Mar 30, 2023
1 parent 6e78665 commit 5ed4ae6
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Programmers/exam54.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
function solution(n) {
let pizza = 6;
while (pizza % n) {
pizza += 6;
}
return pizza / 6;
}

0 comments on commit 5ed4ae6

Please sign in to comment.