class Solution {
public String solution(int num) {
String answer = "";
return answer;
}
}
해결법
방법 1
class Solution {
public String solution(int num) {
String answer = "";
if (num % 2 == 0) {
answer = "Even";
} else {
answer = "Odd";
}
return answer;
}
}
짝수와 홀수 Lv. 1