# 650. 2 Keys Keyboard

[Link](https://leetcode.com/problems/2-keys-keyboard/)

**Solution**

```java
  public int minSteps(int n) {
        int[] dp = new int[n+1];
        dp[1] = 0;
        for(int i = 2; i <= n; i++){
            for(int j = i/2; j >= 1; j--){
                if(i%j == 0){
                    dp[i] = dp[j] + (i/j);
                    break;
                }
            }  
        }
        return dp[n];
    }
```
