Lv0 프로그래머스(Programmers)[JAVA] 주사위 게임2

// 출처:프로그래머스,
// https://school.programmers.co.kr/learn/courses/30/lessons/181930


class Solution {
public int solution(int a, int b, int c) {
if(a==b && a!=c){
double result =(a+b+c)*(Math.pow(a,2)+Math.pow(b,2)+Math.pow(c,2));
return (int) result;
}
else if (a==c && a!=b){
double result =(a+b+c)*(Math.pow(a,2)+Math.pow(b,2)+Math.pow(c,2));
return (int) result;
}

else if (b==c && b!=a){
double result =(a+b+c)*(Math.pow(a,2)+Math.pow(b,2)+Math.pow(c,2));
return (int) result;
}
else if (b==c && a==c){
double result =(a+b+c)*(Math.pow(a,2)+Math.pow(b,2)+Math.pow(c,2))*(Math.pow(a,3)+Math.pow(b,3)+Math.pow(c,3));
return (int) result;
}
else{
return a+b+c;
}

}
}