Redirecting to
NADOS

2 Key Keyboard

1. You are given a number N.
2. You have to print exactly N number of 'X' on a notepad by performing the minimum number of operations.
3. Operations allowed are -
copyAll -> You can copy all the characters present on the notepad.
Paste -> You can paste the last copied characters.
4. You have to find the minimum number of operations to get N 'X'.

Note -> Initially, one 'X' is present on the screen.
Input Format
A number
Output Format
Check the sample output and question video.
Question Video
Constraints
1 <= N <= 1000
Sample Input
3
Sample Output
3


  • Asked in Companies
  • Related Topics






Video Solution

Code Solution

Run
 
Run
Id Name