class Solution { public int solution(int n) { int answer = 0, result = 1; for(int i = 1; i <=10; i++) { result *= i; if(n >= result) { answer = i; } } return answer; } }