Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[202001935 이건하] 1주차 과제 제출합니다 #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions pages/각도기.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
function solution(angle) {
if (angle < 90) {
return 1;
} else if (angle === 90) {
return 2;
} else if (angle > 90 && angle < 180) {
return 3;
} else if (angle === 180) {
return 4;
}
}
16 changes: 16 additions & 0 deletions pages/구슬을 나누는 경우의 수.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
function solution(balls, share) {
if (share > 15)
share = 30 - share;

var sol1 = 1;
var sol2 = 1;

for( var i = share; i > 0; i--)
{
sol1 = sol1*balls;
balls--;

sol2 = sol2*i
}
return sol1/sol2;
}