import java.util.ArrayList;
class Solution {
public int[] solution(int n) {
int[] answer = {};
ArrayList<Integer> arr = new ArrayList<Integer>();
for(int i = 1 ; i <=n ; i++){
if(n%i==0){
arr.add(i);
}
}
answer = new int[arr.size()];
for(int i = 0 ; i < arr.size();i++){
answer[i] = arr.get(i);
}
return answer;
}
}