The number $2015$ has been written in the table. Two friends play this game: In the table they write the difference of the number in the table and one of its factors. The game is lost by the one who reaches $0$. Which of the two can secure victory?
1. **Initial Setup and Game Rules**:
   - The number \(2015\) is written on the table.
   - Two players, \(A\) and \(B\), take turns subtracting a divisor of the current number from the number itself.
   - The player who reaches \(0\) loses the game.

2. **Odd Number Analysis**:
   - Since \(2015\) is odd, every divisor of \(2015\) is also odd.
   - Player \(A\) starts by subtracting an odd divisor from \(2015\), resulting in an even number for player \(B\).

3. **Player \(B\)'s Strategy**:
   - Let \(x\) be the divisor subtracted by \(A\) from \(2015\). The new number is \(2015 - x\), which is even.
   - Player \(B\) will then subtract an odd divisor from this even number, resulting in an odd number for player \(A\).

4. **Alternating Parity**:
   - Each turn, the parity (odd/even nature) of the number alternates:
     - \(A\) subtracts an odd number from an odd number, resulting in an even number for \(B\).
     - \(B\) subtracts an odd number from an even number, resulting in an odd number for \(A\).

5. **Sequence of Moves**:
   - The sequence of numbers will strictly decrease and alternate between odd and even.
   - Since \(2015\) is odd, \(A\) will always receive an odd number and \(B\) will always receive an even number.

6. **Endgame**:
   - The game ends when a player reaches \(0\).
   - Since \(A\) always receives an odd number and \(B\) an even number, \(A\) will be the one to reach \(0\) first.

7. **Conclusion**:
   - Player \(B\) can always ensure that \(A\) receives an odd number and eventually reaches \(0\).

The final answer is Player \( \boxed{ B } \) can secure victory.