class Solution { public String solution(int num) { String answer = ""; if(num % 2 == 0) { answer = "Even"; } else { answer = "Odd"; } return answer; } }
class Solution { public double solution(int[] arr) { double answer = 0; for(int i = 0; i < arr.length; i++) { answer += arr[i]; } return answer/arr.length; } }
class Solution { public int solution(int n) { int answer = 1; while(true) { if(n % answer == 1) { break; } answer++; } return answer; } }
class Solution { public int solution(int n) { int answer = 0; if( n % 2 == 1) { answer = odd(n); } else { answer = even(n); } return answer; } // 홀수 public int odd(int n) { int k = 0; for( int i = 1; i
class Solution { public int solution(int number, int n, int m) { int answer = 0; if( number % n == 0 && number % m == 0) { answer = 1; } return answer; } }