You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: leetcode/601-700/0650.2-Keys-Keyboard/README.md
+16-14Lines changed: 16 additions & 14 deletions
Original file line number
Diff line number
Diff line change
@@ -1,28 +1,30 @@
1
1
# [650.2 Keys Keyboard][title]
2
2
3
-
> [!WARNING|style:flat]
4
-
> This question is temporarily unanswered if you have good ideas. Welcome to [Create Pull Request PR](https://github.com/kylesliu/awesome-golang-algorithm)
5
-
6
3
## Description
4
+
There is only one character `'A'` on the screen of a notepad. You can perform one of two operations on this notepad for each step:
5
+
6
+
- Copy All: You can copy all the characters present on the screen (a partial copy is not allowed).
7
+
- Paste: You can paste the characters which are copied last time.
8
+
9
+
Given an integer `n`, return the minimum number of operations to get the character `'A'` exactly `n` times on the screen.
7
10
8
11
**Example 1:**
9
12
10
13
```
11
-
Input: a = "11", b = "1"
12
-
Output: "100"
14
+
Input: n = 3
15
+
Output: 3
16
+
Explanation: Initially, we have one character 'A'.
0 commit comments