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

#프로그래머스 삼총사 #5

Open
jeongye01 opened this issue Jul 13, 2023 · 0 comments
Open

#프로그래머스 삼총사 #5

jeongye01 opened this issue Jul 13, 2023 · 0 comments

Comments

@jeongye01
Copy link
Owner

class Solution {
public int solution(int[] number) {
int answer = 0;
for(int i=0;i<number.length-2;i++){
for(int j=i+1;j<number.length-1;j++){
for(int k=j+1;k<number.length;k++){
if(number[i]+number[j]+number[k]==0){
answer+=1;
}
}
}
}
return answer;
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant