account-balance-after-rounded-purchase

Account Balance After Rounded Purchase

Prompt:
"""
一开始，你的银行账户里有 100 块钱。

给你一个整数purchaseAmount ，它表示你在一次购买中愿意支出的金额。

在一个商店里，你进行一次购买，实际支出的金额会向 最近 的 10 的 倍数 取整。换句话说，你实际会支付一个 非负 金额 roundedAmount ，满足 roundedAmount 是 10 的倍数且 abs(roundedAmount - purchaseAmount) 的值 最小 。

如果存在多于一个最接近的 10 的倍数，较大的倍数 是你的实际支出金额。

请你返回一个整数，表示你在愿意支出金额为 purchaseAmount 块钱的前提下，购买之后剩下的余额。

注意： 0 也是 10 的倍数。

示例 1：

输入：purchaseAmount = 9
输出：90
解释：这个例子中，最接近 9 的 10 的倍数是 10 。所以你的账户余额为 100 - 10 = 90 。

示例 2：

输入：purchaseAmount = 15
输出：80
解释：这个例子中，有 2 个最接近 15 的 10 的倍数：10 和 20，较大的数 20 是你的实际开销。
所以你的账户余额为 100 - 20 = 80 。

提示：

 * 0 <= purchaseAmount <= 100
"""
class Solution:
    def accountBalanceAfterPurchase(self, purchaseAmount: int) -> int:

一开始，你的银行账户里有 100 块钱。

给你一个整数purchaseAmount ，它表示你在一次购买中愿意支出的金额。

在一个商店里，你进行一次购买，实际支出的金额会向 最近 的 10 的 倍数 取整。换句话说，你实际会支付一个 非负 金额 roundedAmount ，满足 roundedAmount 是 10 的倍数且 abs(roundedAmount - purchaseAmount) 的值 最小 。

如果存在多于一个最接近的 10 的倍数，较大的倍数 是你的实际支出金额。

请你返回一个整数，表示你在愿意支出金额为 purchaseAmount 块钱的前提下，购买之后剩下的余额。

注意： 0 也是 10 的倍数。

示例 1：

输入：purchaseAmount = 9
输出：90
解释：这个例子中，最接近 9 的 10 的倍数是 10 。所以你的账户余额为 100 - 10 = 90 。

示例 2：

输入：purchaseAmount = 15
输出：80
解释：这个例子中，有 2 个最接近 15 的 10 的倍数：10 和 20，较大的数 20 是你的实际开销。
所以你的账户余额为 100 - 20 = 80 。

提示：

 * 0 <= purchaseAmount <= 100

请完成下面的代码来解决上述问题:
```python
class Solution:
    def accountBalanceAfterPurchase(self, purchaseAmount: int) -> int:

```

my_solution = Solution()

test_input = { "purchaseAmount": 9 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 15 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 10 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 11 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 12 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 13 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 14 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 16 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 17 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 18 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 19 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 1 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 100

test_input = { "purchaseAmount": 2 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 100

test_input = { "purchaseAmount": 3 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 100

test_input = { "purchaseAmount": 4 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 100

test_input = { "purchaseAmount": 5 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 6 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 7 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 8 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 90

test_input = { "purchaseAmount": 20 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 21 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 22 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 23 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 24 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 80

test_input = { "purchaseAmount": 25 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 26 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 27 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 28 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 29 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 30 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 31 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 32 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 33 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 34 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 70

test_input = { "purchaseAmount": 35 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 36 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 37 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 38 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 39 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 40 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 41 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 42 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 43 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 44 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 60

test_input = { "purchaseAmount": 45 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 46 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 47 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 48 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 49 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 50 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 51 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 52 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 53 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 54 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 50

test_input = { "purchaseAmount": 55 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 56 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 57 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 58 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 59 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 60 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 61 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 62 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 63 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 64 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 40

test_input = { "purchaseAmount": 65 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 66 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 67 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 68 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 69 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 70 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 71 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 72 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 73 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 74 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 30

test_input = { "purchaseAmount": 75 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 76 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 77 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 78 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 79 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 80 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 81 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 82 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 83 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 84 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 20

test_input = { "purchaseAmount": 85 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 86 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 87 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 88 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 89 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 90 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 91 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 92 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 93 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 94 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 10

test_input = { "purchaseAmount": 95 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0

test_input = { "purchaseAmount": 96 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0

test_input = { "purchaseAmount": 97 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0

test_input = { "purchaseAmount": 98 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0

test_input = { "purchaseAmount": 99 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0

test_input = { "purchaseAmount": 100 }
assert my_solution.accountBalanceAfterPurchase(**test_input) == 0


insert-greatest-common-divisors-in-linked-list

Insert Greatest Common Divisors in Linked List

Prompt:
"""
给你一个链表的头 head ，每个结点包含一个整数值。

在相邻结点之间，请你插入一个新的结点，结点值为这两个相邻结点值的 最大公约数 。

请你返回插入之后的链表。

两个数的 最大公约数 是可以被两个数字整除的最大正整数。

示例 1：

[https://assets.leetcode.com/uploads/2023/07/18/ex1_copy.png]

输入：head = [18,6,10,3]
输出：[18,6,6,2,10,1,3]
解释：第一幅图是一开始的链表，第二幅图是插入新结点后的图（蓝色结点为新插入结点）。
- 18 和 6 的最大公约数为 6 ，插入第一和第二个结点之间。
- 6 和 10 的最大公约数为 2 ，插入第二和第三个结点之间。
- 10 和 3 的最大公约数为 1 ，插入第三和第四个结点之间。
所有相邻结点之间都插入完毕，返回链表。

示例 2：

[https://assets.leetcode.com/uploads/2023/07/18/ex2_copy1.png]

输入：head = [7]
输出：[7]
解释：第一幅图是一开始的链表，第二幅图是插入新结点后的图（蓝色结点为新插入结点）。
没有相邻结点，所以返回初始链表。

提示：

 * 链表中结点数目在 [1, 5000] 之间。
 * 1 <= Node.val <= 1000
"""
# Definition for singly-linked list.
class ListNode:
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next
class Solution:
    def insertGreatestCommonDivisors(self, head: Optional[ListNode]) -> Optional[ListNode]:

给你一个链表的头 head ，每个结点包含一个整数值。

在相邻结点之间，请你插入一个新的结点，结点值为这两个相邻结点值的 最大公约数 。

请你返回插入之后的链表。

两个数的 最大公约数 是可以被两个数字整除的最大正整数。

示例 1：

[https://assets.leetcode.com/uploads/2023/07/18/ex1_copy.png]

输入：head = [18,6,10,3]
输出：[18,6,6,2,10,1,3]
解释：第一幅图是一开始的链表，第二幅图是插入新结点后的图（蓝色结点为新插入结点）。
- 18 和 6 的最大公约数为 6 ，插入第一和第二个结点之间。
- 6 和 10 的最大公约数为 2 ，插入第二和第三个结点之间。
- 10 和 3 的最大公约数为 1 ，插入第三和第四个结点之间。
所有相邻结点之间都插入完毕，返回链表。

示例 2：

[https://assets.leetcode.com/uploads/2023/07/18/ex2_copy1.png]

输入：head = [7]
输出：[7]
解释：第一幅图是一开始的链表，第二幅图是插入新结点后的图（蓝色结点为新插入结点）。
没有相邻结点，所以返回初始链表。

提示：

 * 链表中结点数目在 [1, 5000] 之间。
 * 1 <= Node.val <= 1000

请完成下面的代码来解决上述问题:
```python
# Definition for singly-linked list.
class ListNode:
    def __init__(self, val=0, next=None):
        self.val = val
        self.next = next
class Solution:
    def insertGreatestCommonDivisors(self, head: Optional[ListNode]) -> Optional[ListNode]:

```

my_solution = Solution()

_f1 = lambda lst: ListNode(lst[0], _f1(lst[1:])) if lst else None
_f2 = lambda node: [node.val] + _f2(node.next) if node else []

test_input = { "head": _f1([18,6,10,3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18,6,6,2,10,1,3]

test_input = { "head": _f1([7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [7]

test_input = { "head": _f1([19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [19]

test_input = { "head": _f1([2]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [2]

test_input = { "head": _f1([13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [13]

test_input = { "head": _f1([8]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [8]

test_input = { "head": _f1([1]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [1]

test_input = { "head": _f1([3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3]

test_input = { "head": _f1([20]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [20]

test_input = { "head": _f1([14]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [14]

test_input = { "head": _f1([16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [16]

test_input = { "head": _f1([12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12]

test_input = { "head": _f1([9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9]

test_input = { "head": _f1([5]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [5]

test_input = { "head": _f1([4]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [4]

test_input = { "head": _f1([18]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18]

test_input = { "head": _f1([11]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11]

test_input = { "head": _f1([17]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [17]

test_input = { "head": _f1([15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15]

test_input = { "head": _f1([11,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,13]

test_input = { "head": _f1([7,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [7,1,13]

test_input = { "head": _f1([18,17]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18,1,17]

test_input = { "head": _f1([15,17]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,1,17]

test_input = { "head": _f1([13,8]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [13,1,8]

test_input = { "head": _f1([12,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12,4,16]

test_input = { "head": _f1([12,8]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12,4,8]

test_input = { "head": _f1([18,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18,2,16]

test_input = { "head": _f1([16,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [16,16,16]

test_input = { "head": _f1([6,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [6,6,12]

test_input = { "head": _f1([9,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,3,6]

test_input = { "head": _f1([2,17]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [2,1,17]

test_input = { "head": _f1([7,5]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [7,1,5]

test_input = { "head": _f1([15,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,3,6]

test_input = { "head": _f1([3,14]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,1,14]

test_input = { "head": _f1([6,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [6,2,16]

test_input = { "head": _f1([3,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,1,16]

test_input = { "head": _f1([11,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,9]

test_input = { "head": _f1([4,15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [4,1,15]

test_input = { "head": _f1([16,2]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [16,2,2]

test_input = { "head": _f1([12,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12,1,7]

test_input = { "head": _f1([7,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [7,1,9]

test_input = { "head": _f1([7,3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [7,1,3]

test_input = { "head": _f1([8,4]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [8,4,4]

test_input = { "head": _f1([4,11]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [4,1,11]

test_input = { "head": _f1([6,15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [6,3,15]

test_input = { "head": _f1([9,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,1,7]

test_input = { "head": _f1([19,4]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [19,1,4]

test_input = { "head": _f1([17,6,18]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [17,1,6,6,18]

test_input = { "head": _f1([10,8,3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [10,2,8,1,3]

test_input = { "head": _f1([11,4,10]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,4,2,10]

test_input = { "head": _f1([5,3,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [5,1,3,1,13]

test_input = { "head": _f1([2,1,15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [2,1,1,1,15]

test_input = { "head": _f1([17,13,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [17,1,13,1,9]

test_input = { "head": _f1([2,15,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [2,1,15,3,12]

test_input = { "head": _f1([16,12,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [16,4,12,1,13]

test_input = { "head": _f1([1,12,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [1,1,12,1,19]

test_input = { "head": _f1([4,3,3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [4,1,3,3,3]

test_input = { "head": _f1([15,11,3]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,1,11,1,3]

test_input = { "head": _f1([15,18,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,3,18,2,16]

test_input = { "head": _f1([20,6,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [20,2,6,1,7]

test_input = { "head": _f1([9,4,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,1,4,1,7]

test_input = { "head": _f1([20,11,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [20,1,11,1,6]

test_input = { "head": _f1([11,8,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,8,8,16]

test_input = { "head": _f1([1,4,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [1,1,4,4,12]

test_input = { "head": _f1([18,12,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18,6,12,1,19]

test_input = { "head": _f1([8,11,5]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [8,1,11,1,5]

test_input = { "head": _f1([6,10,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [6,2,10,2,6]

test_input = { "head": _f1([3,10,16]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,1,10,2,16]

test_input = { "head": _f1([15,6,15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,3,6,3,15]

test_input = { "head": _f1([9,5,1]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,1,5,1,1]

test_input = { "head": _f1([15,15,18]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,15,15,3,18]

test_input = { "head": _f1([3,16,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,1,16,1,13]

test_input = { "head": _f1([9,3,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,3,3,3,6]

test_input = { "head": _f1([4,14,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [4,2,14,1,9]

test_input = { "head": _f1([15,2,20]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,1,2,2,20]

test_input = { "head": _f1([13,7,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [13,1,7,1,19]

test_input = { "head": _f1([19,19,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [19,19,19,1,12]

test_input = { "head": _f1([8,6,1]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [8,2,6,1,1]

test_input = { "head": _f1([19,10,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [19,1,10,1,19]

test_input = { "head": _f1([6,9,17]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [6,3,9,1,17]

test_input = { "head": _f1([3,19,8]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,1,19,1,8]

test_input = { "head": _f1([12,6,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12,6,6,3,9]

test_input = { "head": _f1([14,16,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [14,2,16,1,19]

test_input = { "head": _f1([12,14,16,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [12,2,14,2,16,4,12]

test_input = { "head": _f1([20,13,19,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [20,1,13,1,19,1,12]

test_input = { "head": _f1([14,13,8,8]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [14,1,13,1,8,8,8]

test_input = { "head": _f1([13,3,3,5]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [13,1,3,3,3,1,5]

test_input = { "head": _f1([11,7,15,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,7,1,15,1,7]

test_input = { "head": _f1([11,7,5,1]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [11,1,7,1,5,1,1]

test_input = { "head": _f1([8,7,15,13]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [8,1,7,1,15,1,13]

test_input = { "head": _f1([1,19,3,19]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [1,1,19,1,3,1,19]

test_input = { "head": _f1([15,19,1,7]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [15,1,19,1,1,1,7]

test_input = { "head": _f1([13,20,9,1]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [13,1,20,1,9,1,1]

test_input = { "head": _f1([18,16,6,9]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [18,2,16,2,6,3,9]

test_input = { "head": _f1([16,6,13,11]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [16,2,6,1,13,1,11]

test_input = { "head": _f1([9,5,1,6]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [9,1,5,1,1,1,6]

test_input = { "head": _f1([3,15,10,12]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [3,3,15,5,10,2,12]

test_input = { "head": _f1([1,9,19,15]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [1,1,9,1,19,1,15]

test_input = { "head": _f1([14,14,19,2]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [14,14,14,1,19,1,2]

test_input = { "head": _f1([5,13,5,4]) }
assert _f2(my_solution.insertGreatestCommonDivisors(**test_input)) == [5,1,13,1,5,1,4]


minimum-seconds-to-equalize-a-circular-array

Minimum Seconds to Equalize a Circular Array

Prompt:
"""
给你一个下标从 0 开始长度为 n 的数组 nums 。

每一秒，你可以对数组执行以下操作：

 * 对于范围在 [0, n - 1] 内的每一个下标 i ，将 nums[i] 替换成 nums[i] ，nums[(i - 1 + n) % n] 或者 nums[(i + 1) % n] 三者之一。

注意，所有元素会被同时替换。

请你返回将数组 nums 中所有元素变成相等元素所需要的 最少 秒数。

示例 1：

输入：nums = [1,2,1,2]
输出：1
解释：我们可以在 1 秒内将数组变成相等元素：
- 第 1 秒，将每个位置的元素分别变为 [nums[3],nums[1],nums[3],nums[3]] 。变化后，nums = [2,2,2,2] 。
1 秒是将数组变成相等元素所需要的最少秒数。

示例 2：

输入：nums = [2,1,3,3,2]
输出：2
解释：我们可以在 2 秒内将数组变成相等元素：
- 第 1 秒，将每个位置的元素分别变为 [nums[0],nums[2],nums[2],nums[2],nums[3]] 。变化后，nums = [2,3,3,3,3] 。
- 第 2 秒，将每个位置的元素分别变为 [nums[1],nums[1],nums[2],nums[3],nums[4]] 。变化后，nums = [3,3,3,3,3] 。
2 秒是将数组变成相等元素所需要的最少秒数。

示例 3：

输入：nums = [5,5,5,5]
输出：0
解释：不需要执行任何操作，因为一开始数组中的元素已经全部相等。

提示：

 * 1 <= n == nums.length <= 105
 * 1 <= nums[i] <= 109
"""
class Solution:
    def minimumSeconds(self, nums: List[int]) -> int:

给你一个下标从 0 开始长度为 n 的数组 nums 。

每一秒，你可以对数组执行以下操作：

 * 对于范围在 [0, n - 1] 内的每一个下标 i ，将 nums[i] 替换成 nums[i] ，nums[(i - 1 + n) % n] 或者 nums[(i + 1) % n] 三者之一。

注意，所有元素会被同时替换。

请你返回将数组 nums 中所有元素变成相等元素所需要的 最少 秒数。

示例 1：

输入：nums = [1,2,1,2]
输出：1
解释：我们可以在 1 秒内将数组变成相等元素：
- 第 1 秒，将每个位置的元素分别变为 [nums[3],nums[1],nums[3],nums[3]] 。变化后，nums = [2,2,2,2] 。
1 秒是将数组变成相等元素所需要的最少秒数。

示例 2：

输入：nums = [2,1,3,3,2]
输出：2
解释：我们可以在 2 秒内将数组变成相等元素：
- 第 1 秒，将每个位置的元素分别变为 [nums[0],nums[2],nums[2],nums[2],nums[3]] 。变化后，nums = [2,3,3,3,3] 。
- 第 2 秒，将每个位置的元素分别变为 [nums[1],nums[1],nums[2],nums[3],nums[4]] 。变化后，nums = [3,3,3,3,3] 。
2 秒是将数组变成相等元素所需要的最少秒数。

示例 3：

输入：nums = [5,5,5,5]
输出：0
解释：不需要执行任何操作，因为一开始数组中的元素已经全部相等。

提示：

 * 1 <= n == nums.length <= 105
 * 1 <= nums[i] <= 109

请完成下面的代码来解决上述问题:
```python
class Solution:
    def minimumSeconds(self, nums: List[int]) -> int:

```

my_solution = Solution()

test_input = { "nums": [1,2,1,2] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [2,1,3,3,2] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [5,5,5,5] }
assert my_solution.minimumSeconds(**test_input) == 0

test_input = { "nums": [4,18] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [11,7] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [14,2] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [14,9] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [20,1] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [17,15] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [11,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [7,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [18,17] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,17] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [13,8] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [12,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [12,8] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [18,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [16,16] }
assert my_solution.minimumSeconds(**test_input) == 0

test_input = { "nums": [6,12] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [9,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [2,17] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [7,5] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,14] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [6,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [11,9] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [4,15] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [16,2] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [12,7] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [7,9] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [7,3] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [8,4] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [4,11] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [6,15] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [9,7] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [19,4] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [17,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [18,10] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [8,3] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [11,4,10] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [5,3,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [2,1,15] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [17,13,9] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [2,15,12] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [16,12,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [1,12,19] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [4,3,3] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,11,3] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,18,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [20,6,7] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [9,4,7] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [20,11,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [11,8,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [1,4,12] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [18,12,19] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [8,11,5] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [6,10,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,10,16] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,6,15] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [9,5,1] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,15,18] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,16,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [9,3,6] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [4,14,9] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [15,2,20] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [13,7,19] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [19,19,12] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [8,6,1] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [19,10,19] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [6,9,17] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,19,8,12] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [6,9,14,16] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [19,12,14,16] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [12,20,13,19] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [12,14,13,8] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [8,13,3,3] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [5,11,7,15] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [7,11,7,5] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [1,8,7,15] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [13,1,19,3] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [19,15,19,1] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [7,13,20,9] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [1,18,16,6] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [9,16,6,13] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [11,9,5,1] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [6,3,15,10] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [12,1,9,19] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [15,14,14,19] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [2,5,13,5] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [4,8,8,13] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [3,9,10,13] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [7,17,11,8] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [4,5,15,11] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [11,15,19,12] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [8,20,5,10] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [5,3,5,17] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [14,19,8,8] }
assert my_solution.minimumSeconds(**test_input) == 1

test_input = { "nums": [16,20,4,13] }
assert my_solution.minimumSeconds(**test_input) == 2

test_input = { "nums": [17,16,2,16] }
assert my_solution.minimumSeconds(**test_input) == 1


minimum-time-to-make-array-sum-at-most-x

Minimum Time to Make Array Sum At Most x

Prompt:
"""
给你两个长度相等下标从 0 开始的整数数组 nums1 和 nums2 。每一秒，对于所有下标 0 <= i < nums1.length ，nums1[i] 的值都增加 nums2[i] 。操作 完成后 ，你可以进行如下操作：

 * 选择任一满足 0 <= i < nums1.length 的下标 i ，并使 nums1[i] = 0 。

同时给你一个整数 x 。

请你返回使 nums1 中所有元素之和 小于等于 x 所需要的 最少 时间，如果无法实现，那么返回 -1 。

示例 1：

输入：nums1 = [1,2,3], nums2 = [1,2,3], x = 4
输出：3
解释：
第 1 秒，我们对 i = 0 进行操作，得到 nums1 = [0,2+2,3+3] = [0,4,6] 。
第 2 秒，我们对 i = 1 进行操作，得到 nums1 = [0+1,0,6+3] = [1,0,9] 。
第 3 秒，我们对 i = 2 进行操作，得到 nums1 = [1+1,0+2,0] = [2,2,0] 。
现在 nums1 的和为 4 。不存在更少次数的操作，所以我们返回 3 。

示例 2：

输入：nums1 = [1,2,3], nums2 = [3,3,3], x = 4
输出：-1
解释：不管如何操作，nums1 的和总是会超过 x 。

提示：

 * 1 <= nums1.length <= 103
 * 1 <= nums1[i] <= 103
 * 0 <= nums2[i] <= 103
 * nums1.length == nums2.length
 * 0 <= x <= 106
"""
class Solution:
    def minimumTime(self, nums1: List[int], nums2: List[int], x: int) -> int:

给你两个长度相等下标从 0 开始的整数数组 nums1 和 nums2 。每一秒，对于所有下标 0 <= i < nums1.length ，nums1[i] 的值都增加 nums2[i] 。操作 完成后 ，你可以进行如下操作：

 * 选择任一满足 0 <= i < nums1.length 的下标 i ，并使 nums1[i] = 0 。

同时给你一个整数 x 。

请你返回使 nums1 中所有元素之和 小于等于 x 所需要的 最少 时间，如果无法实现，那么返回 -1 。

示例 1：

输入：nums1 = [1,2,3], nums2 = [1,2,3], x = 4
输出：3
解释：
第 1 秒，我们对 i = 0 进行操作，得到 nums1 = [0,2+2,3+3] = [0,4,6] 。
第 2 秒，我们对 i = 1 进行操作，得到 nums1 = [0+1,0,6+3] = [1,0,9] 。
第 3 秒，我们对 i = 2 进行操作，得到 nums1 = [1+1,0+2,0] = [2,2,0] 。
现在 nums1 的和为 4 。不存在更少次数的操作，所以我们返回 3 。

示例 2：

输入：nums1 = [1,2,3], nums2 = [3,3,3], x = 4
输出：-1
解释：不管如何操作，nums1 的和总是会超过 x 。

提示：

 * 1 <= nums1.length <= 103
 * 1 <= nums1[i] <= 103
 * 0 <= nums2[i] <= 103
 * nums1.length == nums2.length
 * 0 <= x <= 106

请完成下面的代码来解决上述问题:
```python
class Solution:
    def minimumTime(self, nums1: List[int], nums2: List[int], x: int) -> int:

```

my_solution = Solution()

test_input = { "nums1": [1,2,3], "nums2": [1,2,3], "x": 4 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [1,2,3], "nums2": [3,3,3], "x": 4 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [4,4,9,10], "nums2": [4,4,1,3], "x": 16 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [5,3], "nums2": [3,2], "x": 4 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [4,5,3,2,3,9,5,7,10,4], "nums2": [4,4,0,4,1,2,4,0,4,0], "x": 47 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [7,9,8,5,8,3], "nums2": [0,1,4,2,3,1], "x": 37 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [8,2,3], "nums2": [1,4,2], "x": 13 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [4,7,2,3,4,3,10,8], "nums2": [3,4,0,1,1,0,2,2], "x": 36 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [2,10,10,4,6,3], "nums2": [1,0,0,1,3,1], "x": 35 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [9,5,3], "nums2": [4,1,3], "x": 17 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [1,7,9,4,8,8,1], "nums2": [2,2,3,2,0,1,0], "x": 20 }
assert my_solution.minimumTime(**test_input) == 6

test_input = { "nums1": [9,2,8,3,1,9,7,6], "nums2": [0,3,4,1,3,4,2,1], "x": 40 }
assert my_solution.minimumTime(**test_input) == 8

test_input = { "nums1": [10], "nums2": [3], "x": 10 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [7,6,8,2,8,9,3,3], "nums2": [2,2,4,0,0,2,2,3], "x": 45 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [4,9,5,2,3], "nums2": [4,2,0,4,0], "x": 18 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [2,10,2,7,8,9,7,6,6], "nums2": [4,2,1,4,3,2,4,4,4], "x": 55 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [6,8,10,7,10,9], "nums2": [4,2,0,4,4,2], "x": 38 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [9,2,8,5,8,3,5,2,2], "nums2": [4,3,4,2,0,1,4,4,2], "x": 41 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [5,3,2,3,10,4,7,9,1,10], "nums2": [2,0,2,0,3,3,4,4,0,1], "x": 30 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [2,3,5], "nums2": [0,0,1], "x": 8 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [7,9,7,9], "nums2": [4,2,0,4], "x": 32 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [8,5,6,4,7,6,3,9,4], "nums2": [0,4,2,4,3,3,1,4,4], "x": 38 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [3,1,1,1], "nums2": [0,0,3,0], "x": 3 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [6,6,8,7,1,7], "nums2": [2,2,1,1,2,3], "x": 27 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [10,5], "nums2": [1,3], "x": 14 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [10,7,1,2,6], "nums2": [4,3,2,2,4], "x": 17 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [9,5,6,1,9,4,5,7], "nums2": [0,4,0,2,2,3,2,4], "x": 24 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [4,1,2,4,10,7,8], "nums2": [0,2,0,4,0,2,1], "x": 18 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [4], "nums2": [0], "x": 4 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [4,7,1,7,5,10], "nums2": [0,4,3,2,3,1], "x": 29 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [9,8,9,7,4,6,8,6,4], "nums2": [4,3,3,3,1,2,2,1,0], "x": 42 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [8,3,2], "nums2": [3,1,3], "x": 7 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [6,5,2,8,8,1,6,4], "nums2": [1,2,1,0,1,0,3,1], "x": 23 }
assert my_solution.minimumTime(**test_input) == 6

test_input = { "nums1": [3,8,5,4,10,2], "nums2": [4,1,4,2,1,0], "x": 26 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [5,3], "nums2": [0,3], "x": 4 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [8], "nums2": [4], "x": 7 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [1,8,6,8,6], "nums2": [3,0,2,4,0], "x": 16 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [8,6], "nums2": [0,3], "x": 14 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [3,4,5,2,4,10,6,3,6,4], "nums2": [3,0,0,2,4,2,4,1,2,1], "x": 28 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [3,2,5,8,8], "nums2": [1,3,2,1,0], "x": 20 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [9,2,8,7,5,2,3,2], "nums2": [3,2,3,0,4,3,1,4], "x": 37 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [6,4,3,1,10,5,10,3,5,9], "nums2": [0,4,1,2,1,2,3,3,4,2], "x": 41 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [6,10,7,10,6,7,7,4], "nums2": [1,3,0,0,1,2,1,3], "x": 55 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [6,4,3,1], "nums2": [1,1,3,3], "x": 7 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [2,10,8,10,1,4,7,10,5,1], "nums2": [4,3,1,2,3,1,3,2,2,1], "x": 29 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [2,8,5], "nums2": [2,0,2], "x": 14 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [7,10,1,3,7,3,2], "nums2": [1,1,3,0,2,2,3], "x": 22 }
assert my_solution.minimumTime(**test_input) == 7

test_input = { "nums1": [6,4,2,3,8,6,6,8,10], "nums2": [2,1,4,1,2,1,0,1,4], "x": 39 }
assert my_solution.minimumTime(**test_input) == 9

test_input = { "nums1": [4,4,8,10,2,7,9,8,1,8], "nums2": [1,0,4,0,3,3,1,2,2,1], "x": 44 }
assert my_solution.minimumTime(**test_input) == 10

test_input = { "nums1": [2,4,1,8,3,9], "nums2": [0,2,0,0,0,4], "x": 21 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [6,10], "nums2": [2,1], "x": 8 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [8,6], "nums2": [3,0], "x": 10 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [5,5,5,10], "nums2": [0,1,0,3], "x": 21 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [7,1,1,2,9,3,3,2,2], "nums2": [0,1,4,3,4,1,2,1,2], "x": 15 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [10,4,1,10,7,5,6,3,2,10], "nums2": [4,0,4,0,3,4,3,0,0,3], "x": 50 }
assert my_solution.minimumTime(**test_input) == 9

test_input = { "nums1": [9,4,6,2], "nums2": [3,4,0,4], "x": 15 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [7,3,9,2,9,10,7,10,10,4], "nums2": [1,4,2,1,4,1,1,0,3,4], "x": 69 }
assert my_solution.minimumTime(**test_input) == 8

test_input = { "nums1": [4,5,6], "nums2": [4,4,0], "x": 13 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [2,3,3,4,4], "nums2": [2,2,1,1,1], "x": 12 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [4,5,5,3,7], "nums2": [3,3,2,0,4], "x": 21 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [1,3,3,4], "nums2": [1,3,2,3], "x": 6 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [9,1,8,9,7,2], "nums2": [3,3,0,2,3,4], "x": 26 }
assert my_solution.minimumTime(**test_input) == 6

test_input = { "nums1": [5,5,6,8,6,1,5,7,8], "nums2": [2,1,0,3,2,2,2,2,4], "x": 33 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [2,9,5,5,6,7,7,9], "nums2": [1,3,0,3,3,3,4,2], "x": 47 }
assert my_solution.minimumTime(**test_input) == 8

test_input = { "nums1": [3], "nums2": [0], "x": 2 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [3,6,4,8,7,9,3,3,9], "nums2": [4,3,2,0,0,3,3,1,4], "x": 34 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [8], "nums2": [1], "x": 6 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [1,7,6,2,9], "nums2": [4,2,3,3,0], "x": 23 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [9,10,10,5,2,4], "nums2": [2,4,0,3,3,4], "x": 40 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [9,10,9,4,8,9,10,7,5], "nums2": [2,0,3,0,2,4,3,2,4], "x": 69 }
assert my_solution.minimumTime(**test_input) == 7

test_input = { "nums1": [1,7,2,7], "nums2": [1,0,2,3], "x": 10 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [10,4], "nums2": [2,4], "x": 10 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [2,10,3,6,2,10,4], "nums2": [4,1,4,4,4,0,0], "x": 30 }
assert my_solution.minimumTime(**test_input) == 7

test_input = { "nums1": [5,9,6], "nums2": [1,3,2], "x": 20 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [4,5,2,4,2,7], "nums2": [0,0,0,0,3,0], "x": 23 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [8], "nums2": [0], "x": 7 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [3], "nums2": [3], "x": 3 }
assert my_solution.minimumTime(**test_input) == 0

test_input = { "nums1": [6,1,10,10], "nums2": [3,2,4,0], "x": 13 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [8,9,2,10,10,1,5], "nums2": [4,3,3,0,2,1,2], "x": 38 }
assert my_solution.minimumTime(**test_input) == 5

test_input = { "nums1": [10,2], "nums2": [3,4], "x": 10 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [8,9,2], "nums2": [2,4,1], "x": 16 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [4,2,3], "nums2": [4,2,2], "x": 4 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [9,8,7,6,5,1,4], "nums2": [2,4,1,2,3,3,0], "x": 28 }
assert my_solution.minimumTime(**test_input) == 7

test_input = { "nums1": [3,4,10,1,2,4,10,3,7,2], "nums2": [4,0,0,1,1,4,4,4,2,1], "x": 44 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [3,5,5,1,6,4,3], "nums2": [1,3,4,3,3,1,4], "x": 23 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [3,8,10,2,5,10], "nums2": [4,0,3,2,4,3], "x": 37 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [8,8,10,8,9,6,1,8], "nums2": [2,0,0,1,2,1,0,4], "x": 38 }
assert my_solution.minimumTime(**test_input) == 4

test_input = { "nums1": [10,7,3,10,7,6,6,10], "nums2": [1,2,4,0,3,4,0,3], "x": 41 }
assert my_solution.minimumTime(**test_input) == 7

test_input = { "nums1": [6,7,4,1,9,6], "nums2": [3,3,3,0,0,1], "x": 32 }
assert my_solution.minimumTime(**test_input) == 2

test_input = { "nums1": [2], "nums2": [2], "x": 1 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [8,9,4,5,6,7], "nums2": [0,3,4,3,3,1], "x": 27 }
assert my_solution.minimumTime(**test_input) == 6

test_input = { "nums1": [7], "nums2": [1], "x": 3 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [9], "nums2": [0], "x": 5 }
assert my_solution.minimumTime(**test_input) == 1

test_input = { "nums1": [7,2,2,2,7,4,2,10,8], "nums2": [4,3,2,4,4,0,1,1,2], "x": 31 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [7,2,6,4,9,9,1,9,6,7], "nums2": [0,1,3,2,3,3,4,2,2,1], "x": 58 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [6,8,2,3,9,8,10,9,9], "nums2": [1,4,2,3,2,0,1,1,3], "x": 40 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [1,1,5], "nums2": [4,4,2], "x": 3 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [7,5,8,3,10,2,4,8,7], "nums2": [4,4,2,4,2,3,1,1,1], "x": 49 }
assert my_solution.minimumTime(**test_input) == -1

test_input = { "nums1": [4,7,2,6,9,2], "nums2": [1,2,1,4,1,3], "x": 28 }
assert my_solution.minimumTime(**test_input) == 3

test_input = { "nums1": [3,6,3,9,5], "nums2": [0,4,0,3,1], "x": 23 }
assert my_solution.minimumTime(**test_input) == 1


number-of-employees-who-met-the-target

Number of Employees Who Met the Target

Prompt:
"""
公司里共有 n 名员工，按从 0 到 n - 1 编号。每个员工 i 已经在公司工作了 hours[i] 小时。

公司要求每位员工工作 至少 target 小时。

给你一个下标从 0 开始、长度为 n 的非负整数数组 hours 和一个非负整数 target 。

请你用整数表示并返回工作至少 target 小时的员工数。

示例 1：

输入：hours = [0,1,2,3,4], target = 2
输出：3
解释：公司要求每位员工工作至少 2 小时。
- 员工 0 工作 0 小时，不满足要求。
- 员工 1 工作 1 小时，不满足要求。
- 员工 2 工作 2 小时，满足要求。
- 员工 3 工作 3 小时，满足要求。
- 员工 4 工作 4 小时，满足要求。
共有 3 位满足要求的员工。

示例 2：

输入：hours = [5,1,4,2,2], target = 6
输出：0
解释：公司要求每位员工工作至少 6 小时。
共有 0 位满足要求的员工。

提示：

 * 1 <= n == hours.length <= 50
 * 0 <= hours[i], target <= 105
"""
class Solution:
    def numberOfEmployeesWhoMetTarget(self, hours: List[int], target: int) -> int:

公司里共有 n 名员工，按从 0 到 n - 1 编号。每个员工 i 已经在公司工作了 hours[i] 小时。

公司要求每位员工工作 至少 target 小时。

给你一个下标从 0 开始、长度为 n 的非负整数数组 hours 和一个非负整数 target 。

请你用整数表示并返回工作至少 target 小时的员工数。

示例 1：

输入：hours = [0,1,2,3,4], target = 2
输出：3
解释：公司要求每位员工工作至少 2 小时。
- 员工 0 工作 0 小时，不满足要求。
- 员工 1 工作 1 小时，不满足要求。
- 员工 2 工作 2 小时，满足要求。
- 员工 3 工作 3 小时，满足要求。
- 员工 4 工作 4 小时，满足要求。
共有 3 位满足要求的员工。

示例 2：

输入：hours = [5,1,4,2,2], target = 6
输出：0
解释：公司要求每位员工工作至少 6 小时。
共有 0 位满足要求的员工。

提示：

 * 1 <= n == hours.length <= 50
 * 0 <= hours[i], target <= 105

请完成下面的代码来解决上述问题:
```python
class Solution:
    def numberOfEmployeesWhoMetTarget(self, hours: List[int], target: int) -> int:

```

my_solution = Solution()

test_input = { "hours": [0,1,2,3,4], "target": 2 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [5,1,4,2,2], "target": 6 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [98], "target": 5 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [19], "target": 13 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [70], "target": 13 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [26], "target": 14 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [2], "target": 16 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [77], "target": 19 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [6], "target": 21 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [27], "target": 21 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [36], "target": 22 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [42], "target": 25 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [70], "target": 27 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [2], "target": 28 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [14], "target": 31 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [45], "target": 34 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [44], "target": 35 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [11], "target": 39 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [71], "target": 39 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [91], "target": 45 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [81], "target": 51 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [15], "target": 52 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [90], "target": 59 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [40], "target": 64 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [12], "target": 69 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [83], "target": 70 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [38], "target": 74 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [18], "target": 78 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [60], "target": 83 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [50], "target": 87 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [75], "target": 92 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [91], "target": 96 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [11], "target": 97 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [48,28], "target": 2 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [38,46], "target": 3 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [30,79], "target": 6 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [45,78], "target": 6 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [20,69], "target": 10 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [82,67], "target": 11 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [29,75], "target": 12 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [97,37], "target": 17 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [42,100], "target": 20 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [11,58], "target": 21 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [12,46], "target": 21 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [70,84], "target": 37 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [7,100], "target": 38 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [47,94], "target": 40 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [18,34], "target": 50 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [47,79], "target": 55 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [74,99], "target": 56 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [53,81], "target": 67 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [36,61], "target": 68 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [48,98], "target": 71 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [71,94], "target": 72 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [60,99], "target": 73 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [12,12], "target": 74 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [100,87], "target": 75 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [12,56], "target": 77 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [15,36], "target": 86 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [53,45], "target": 86 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [4,77], "target": 89 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [23,29], "target": 93 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [76,62,96], "target": 5 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [82,67,33], "target": 5 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [28,96,39], "target": 10 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [42,93,58], "target": 13 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [53,22,48], "target": 13 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [68,81,61], "target": 13 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [68,32,33], "target": 22 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [59,65,70], "target": 26 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [15,43,21], "target": 29 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [40,80,75], "target": 33 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [64,11,73], "target": 34 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [1,74,34], "target": 44 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [96,79,91], "target": 44 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 3

test_input = { "hours": [59,9,9], "target": 48 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [79,48,62], "target": 53 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [58,83,2], "target": 54 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [51,40,12], "target": 57 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [54,2,80], "target": 60 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [92,45,91], "target": 65 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 2

test_input = { "hours": [93,23,46], "target": 67 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [17,60,1], "target": 70 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [9,63,77], "target": 73 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [44,86,37], "target": 73 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [75,37,68], "target": 73 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [33,26,77], "target": 78 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [11,88,27], "target": 79 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [12,48,44], "target": 80 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [19,88,13], "target": 82 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [61,56,67], "target": 82 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [46,24,38], "target": 84 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [93,51,83], "target": 85 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 1

test_input = { "hours": [58,14,83], "target": 87 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [52,33,56], "target": 89 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [34,73,46], "target": 91 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [26,59,55], "target": 94 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [41,89,34], "target": 100 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 0

test_input = { "hours": [9,26,77,55], "target": 0 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 4

test_input = { "hours": [24,79,63,37], "target": 1 }
assert my_solution.numberOfEmployeesWhoMetTarget(**test_input) == 4


count-complete-subarrays-in-an-array

Count Complete Subarrays in an Array

Prompt:
"""
给你一个由 正 整数组成的数组 nums 。

如果数组中的某个子数组满足下述条件，则称之为 完全子数组 ：

 * 子数组中 不同 元素的数目等于整个数组不同元素的数目。

返回数组中 完全子数组 的数目。

子数组 是数组中的一个连续非空序列。

示例 1：

输入：nums = [1,3,1,2,2]
输出：4
解释：完全子数组有：[1,3,1,2]、[1,3,1,2,2]、[3,1,2] 和 [3,1,2,2] 。

示例 2：

输入：nums = [5,5,5,5]
输出：10
解释：数组仅由整数 5 组成，所以任意子数组都满足完全子数组的条件。子数组的总数为 10 。

提示：

 * 1 <= nums.length <= 1000
 * 1 <= nums[i] <= 2000
"""
class Solution:
    def countCompleteSubarrays(self, nums: List[int]) -> int:

给你一个由 正 整数组成的数组 nums 。

如果数组中的某个子数组满足下述条件，则称之为 完全子数组 ：

 * 子数组中 不同 元素的数目等于整个数组不同元素的数目。

返回数组中 完全子数组 的数目。

子数组 是数组中的一个连续非空序列。

示例 1：

输入：nums = [1,3,1,2,2]
输出：4
解释：完全子数组有：[1,3,1,2]、[1,3,1,2,2]、[3,1,2] 和 [3,1,2,2] 。

示例 2：

输入：nums = [5,5,5,5]
输出：10
解释：数组仅由整数 5 组成，所以任意子数组都满足完全子数组的条件。子数组的总数为 10 。

提示：

 * 1 <= nums.length <= 1000
 * 1 <= nums[i] <= 2000

请完成下面的代码来解决上述问题:
```python
class Solution:
    def countCompleteSubarrays(self, nums: List[int]) -> int:

```

my_solution = Solution()

test_input = { "nums": [1,3,1,2,2] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [5,5,5,5] }
assert my_solution.countCompleteSubarrays(**test_input) == 10

test_input = { "nums": [459,459,962,1579,1435,756,1872,1597] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1786,1786,1786,114] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1632,1632,528,359,1671,1632,511,1087,424,1684] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1430,12,1430,1075,1722] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1917,1917,608,608,1313,751,558,1561,608] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [254,1690,1690,1068,1779] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1116] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1677,1677,1352,1219,1666,1677,1892,1892,319] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1386,1997,1997,574,574,1360,989] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [50,48,1118,540,1248,1984,1698,41,1984,186] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [273,524,40,1323,1323] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [246,376,828,191,1942,210] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [463,1497,1676,127,1379,17,1075,190] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [765,1370] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1110,804,1110,839,728,839] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [1001] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [665,867,954,1411,728,1006,372,1411] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1213,1203,1277,369,1277] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1898,370,822,1659,1360,128,370,360,261,1898] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [1881,1446] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [474,315,155,155,1986] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1389,1817,401,1067,1356,1997] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1586,1332,1055,1586,1586,1861,892,1445] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1601,1601] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1417,1417,1160,387,928,1572,1832] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1497,1237,1237,946,682,331,742] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [377,377] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [356,356,356,356,356,315] }
assert my_solution.countCompleteSubarrays(**test_input) == 5

test_input = { "nums": [285] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [211,211,731,226] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1253,188,188,5,1393,1696,1062] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [90,1297,482,482,90,1836,1045,1497,482] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [1857,273,609,609,1803,1491,223,609,1857,1052] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [617,1014,679,934,955] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [577,577] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1793,997,1082,1411,997,546,224,336,307,336] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1150,1150] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [634] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1454,1789,1454] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1657,1090,1682,1376,547,547,407,755,1124,1376] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [379] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1673,1584,1584,1055,1971,1122,1086,1692,75] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [722,1427] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1641,448,1641,1437,448,1406,1437] }
assert my_solution.countCompleteSubarrays(**test_input) == 6

test_input = { "nums": [1440,704,1440,1440,749] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [832,832] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1635,1759,1759,1976,700] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1577,1674,1745,156,596,1973,1390,156,1497,415] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1646,1991] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1613,881,1660,1270,1783,881,773,1783,1229,111] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [431] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [113] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [151] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [999,701,389,999,409,488,993,999,517,1860] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [236,596,1263,1563,860,596,1184,575] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [278,338] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [939] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1293,564,614,694,1386,564] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [681,448] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1563,558,1778,1404,1973] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1508,1508,649] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [1077,445,1947,445,789,789,789,956,1988,189] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1984,526,30,1205,1691,1984,1241,280,280,1984] }
assert my_solution.countCompleteSubarrays(**test_input) == 6

test_input = { "nums": [1802,1876,1143,1802,1012,1876,1802,1821] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1338,901,613,575,613] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [406,406,242,242,770,1063,1436,1063,1063] }
assert my_solution.countCompleteSubarrays(**test_input) == 6

test_input = { "nums": [1235,1235] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1337,1088,1088,892,1209,1269] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1941,1941] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [319] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1891,1891,1748,1748,923,1748,923,763,1062,1748] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [1111,503,1980] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [213,1666,469,1675] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [769,1774,1654,928,1204] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [294,294,294,294,1351,294,1351,62,585] }
assert my_solution.countCompleteSubarrays(**test_input) == 6

test_input = { "nums": [1197] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [21,1549,21,1549,1998,1219,1549,1021] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1124,1124,556,1322,556] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [908,908,863,1977,908,8,427,1322] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [770] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [517,1497,334,334,996,1497,1394,534] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [564,750,750,750,1965,1965,1402] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [403,1080,365,1962,1589,1740,1335,1335,1589] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [1712,1621,1295,522,1734,522,1371,1935,684] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [270,1443,807,1704,1487] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1880,1880,1880,604,1634,1412,1880,67,1759,1488] }
assert my_solution.countCompleteSubarrays(**test_input) == 4

test_input = { "nums": [540,1799,1784,1799,972,1786,1578,1480,178,532] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1235,471,367] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1887,1373,190,1764,1764,959,959,1373,17] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1313,910,1172,1541,1758,140,1380,492,240,1664] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [381,1304,381,758,1304,381,758] }
assert my_solution.countCompleteSubarrays(**test_input) == 14

test_input = { "nums": [1517,665] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1555,223,379,223,379,1982] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1268,1268,1268,1268] }
assert my_solution.countCompleteSubarrays(**test_input) == 10

test_input = { "nums": [1051,266,266,94,761,1051,255] }
assert my_solution.countCompleteSubarrays(**test_input) == 3

test_input = { "nums": [420,945,3,172] }
assert my_solution.countCompleteSubarrays(**test_input) == 1

test_input = { "nums": [1045,1120,1045,511,1045,1777,1224,336,560,153] }
assert my_solution.countCompleteSubarrays(**test_input) == 2

test_input = { "nums": [627,592,592,1416,370,229,526,633] }
assert my_solution.countCompleteSubarrays(**test_input) == 1


shortest-string-that-contains-three-strings

Shortest String That Contains Three Strings

Prompt:
"""
给你三个字符串 a ，b 和 c ， 你的任务是找到长度 最短 的字符串，且这三个字符串都是它的 子字符串 。

如果有多个这样的字符串，请你返回 字典序最小 的一个。

请你返回满足题目要求的字符串。

注意：

 * 两个长度相同的字符串 a 和 b ，如果在第一个不相同的字符处，a 的字母在字母表中比 b 的字母 靠前 ，那么字符串 a 比字符串 b 字典序小 。
 * 子字符串 是一个字符串中一段连续的字符序列。

示例 1：

输入：a = "abc", b = "bca", c = "aaa"
输出："aaabca"
解释：字符串 "aaabca" 包含所有三个字符串：a = ans[2...4] ，b = ans[3..5] ，c = ans[0..2] 。结果字符串的长度至少为 6 ，且"aaabca" 是字典序最小的一个。

示例 2：

输入：a = "ab", b = "ba", c = "aba"
输出："aba"
解释：字符串 "aba" 包含所有三个字符串：a = ans[0..1] ，b = ans[1..2] ，c = ans[0..2] 。由于 c 的长度为 3 ，结果字符串的长度至少为 3 。"aba" 是字典序最小的一个。

提示：

 * 1 <= a.length, b.length, c.length <= 100
 * a ，b ，c 只包含小写英文字母。
"""
class Solution:
    def minimumString(self, a: str, b: str, c: str) -> str:

给你三个字符串 a ，b 和 c ， 你的任务是找到长度 最短 的字符串，且这三个字符串都是它的 子字符串 。

如果有多个这样的字符串，请你返回 字典序最小 的一个。

请你返回满足题目要求的字符串。

注意：

 * 两个长度相同的字符串 a 和 b ，如果在第一个不相同的字符处，a 的字母在字母表中比 b 的字母 靠前 ，那么字符串 a 比字符串 b 字典序小 。
 * 子字符串 是一个字符串中一段连续的字符序列。

示例 1：

输入：a = "abc", b = "bca", c = "aaa"
输出："aaabca"
解释：字符串 "aaabca" 包含所有三个字符串：a = ans[2...4] ，b = ans[3..5] ，c = ans[0..2] 。结果字符串的长度至少为 6 ，且"aaabca" 是字典序最小的一个。

示例 2：

输入：a = "ab", b = "ba", c = "aba"
输出："aba"
解释：字符串 "aba" 包含所有三个字符串：a = ans[0..1] ，b = ans[1..2] ，c = ans[0..2] 。由于 c 的长度为 3 ，结果字符串的长度至少为 3 。"aba" 是字典序最小的一个。

提示：

 * 1 <= a.length, b.length, c.length <= 100
 * a ，b ，c 只包含小写英文字母。

请完成下面的代码来解决上述问题:
```python
class Solution:
    def minimumString(self, a: str, b: str, c: str) -> str:

```

my_solution = Solution()

test_input = { "a": "abc", "b": "bca", "c": "aaa" }
assert my_solution.minimumString(**test_input) == "aaabca"

test_input = { "a": "ab", "b": "ba", "c": "aba" }
assert my_solution.minimumString(**test_input) == "aba"

test_input = { "a": "xyyyz", "b": "xzyz", "c": "zzz" }
assert my_solution.minimumString(**test_input) == "xyyyzxzyzzz"

test_input = { "a": "a", "b": "a", "c": "a" }
assert my_solution.minimumString(**test_input) == "a"

test_input = { "a": "a", "b": "a", "c": "b" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "a", "b": "c", "c": "a" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "a", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "a", "b": "a", "c": "c" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "a", "b": "c", "c": "b" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "c", "b": "c", "c": "a" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "k", "b": "e", "c": "a" }
assert my_solution.minimumString(**test_input) == "aek"

test_input = { "a": "a", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "b", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "b", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "b"

test_input = { "a": "b", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "c", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "b", "b": "c", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "b", "b": "c", "c": "a" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "c", "b": "a", "c": "c" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "c", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "c", "b": "c", "c": "c" }
assert my_solution.minimumString(**test_input) == "c"

test_input = { "a": "e", "b": "k", "c": "y" }
assert my_solution.minimumString(**test_input) == "eky"

test_input = { "a": "z", "b": "p", "c": "m" }
assert my_solution.minimumString(**test_input) == "mpz"

test_input = { "a": "a", "b": "aa", "c": "a" }
assert my_solution.minimumString(**test_input) == "aa"

test_input = { "a": "ac", "b": "a", "c": "a" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "ca", "b": "a", "c": "a" }
assert my_solution.minimumString(**test_input) == "ca"

test_input = { "a": "a", "b": "cc", "c": "a" }
assert my_solution.minimumString(**test_input) == "acc"

test_input = { "a": "a", "b": "a", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aa"

test_input = { "a": "c", "b": "a", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aac"

test_input = { "a": "a", "b": "ab", "c": "a" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "ab", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "ab", "b": "a", "c": "c" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "c", "b": "ac", "c": "a" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "ab", "b": "a", "c": "b" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "b", "b": "a", "c": "ba" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "ba", "b": "a", "c": "a" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "b", "b": "ba", "c": "a" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "a", "b": "bc", "c": "a" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "c", "b": "a", "c": "bc" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "a", "b": "c", "c": "ab" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "c", "b": "a", "c": "ac" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "a", "b": "c", "c": "ca" }
assert my_solution.minimumString(**test_input) == "ca"

test_input = { "a": "c", "b": "a", "c": "cc" }
assert my_solution.minimumString(**test_input) == "acc"

test_input = { "a": "a", "b": "ca", "c": "a" }
assert my_solution.minimumString(**test_input) == "ca"

test_input = { "a": "a", "b": "cc", "c": "c" }
assert my_solution.minimumString(**test_input) == "acc"

test_input = { "a": "aa", "b": "a", "c": "a" }
assert my_solution.minimumString(**test_input) == "aa"

test_input = { "a": "aa", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "aab"

test_input = { "a": "a", "b": "aa", "c": "c" }
assert my_solution.minimumString(**test_input) == "aac"

test_input = { "a": "b", "b": "c", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aabc"

test_input = { "a": "b", "b": "b", "c": "ab" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "ab", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "ac", "b": "c", "c": "b" }
assert my_solution.minimumString(**test_input) == "acb"

test_input = { "a": "c", "b": "c", "c": "ac" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "ba", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "a", "b": "b", "c": "ca" }
assert my_solution.minimumString(**test_input) == "bca"

test_input = { "a": "b", "b": "a", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aab"

test_input = { "a": "b", "b": "b", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aab"

test_input = { "a": "b", "b": "ab", "c": "a" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "b", "b": "ab", "c": "b" }
assert my_solution.minimumString(**test_input) == "ab"

test_input = { "a": "ac", "b": "b", "c": "a" }
assert my_solution.minimumString(**test_input) == "acb"

test_input = { "a": "b", "b": "b", "c": "ac" }
assert my_solution.minimumString(**test_input) == "acb"

test_input = { "a": "bb", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "bb"

test_input = { "a": "b", "b": "bc", "c": "b" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "b", "b": "b", "c": "ca" }
assert my_solution.minimumString(**test_input) == "bca"

test_input = { "a": "cb", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "b", "b": "b", "c": "bb" }
assert my_solution.minimumString(**test_input) == "bb"

test_input = { "a": "b", "b": "a", "c": "bc" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "b", "b": "bc", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "b", "b": "ab", "c": "c" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "b", "b": "bb", "c": "c" }
assert my_solution.minimumString(**test_input) == "bbc"

test_input = { "a": "c", "b": "b", "c": "bc" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "b", "b": "cb", "c": "c" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "b", "b": "cc", "c": "c" }
assert my_solution.minimumString(**test_input) == "bcc"

test_input = { "a": "b", "b": "cb", "c": "a" }
assert my_solution.minimumString(**test_input) == "acb"

test_input = { "a": "b", "b": "b", "c": "cb" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "c", "b": "b", "c": "cb" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "a", "b": "ba", "c": "b" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "ba", "b": "a", "c": "b" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "ba", "b": "b", "c": "b" }
assert my_solution.minimumString(**test_input) == "ba"

test_input = { "a": "b", "b": "ba", "c": "c" }
assert my_solution.minimumString(**test_input) == "bac"

test_input = { "a": "c", "b": "ba", "c": "b" }
assert my_solution.minimumString(**test_input) == "bac"

test_input = { "a": "c", "b": "c", "c": "ba" }
assert my_solution.minimumString(**test_input) == "bac"

test_input = { "a": "bb", "b": "a", "c": "b" }
assert my_solution.minimumString(**test_input) == "abb"

test_input = { "a": "b", "b": "bb", "c": "b" }
assert my_solution.minimumString(**test_input) == "bb"

test_input = { "a": "c", "b": "bb", "c": "b" }
assert my_solution.minimumString(**test_input) == "bbc"

test_input = { "a": "a", "b": "bc", "c": "b" }
assert my_solution.minimumString(**test_input) == "abc"

test_input = { "a": "bc", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "bc", "b": "c", "c": "b" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "bc", "b": "c", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "ac", "b": "a", "c": "c" }
assert my_solution.minimumString(**test_input) == "ac"

test_input = { "a": "c", "b": "c", "c": "aa" }
assert my_solution.minimumString(**test_input) == "aac"

test_input = { "a": "cb", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "c", "b": "b", "c": "cc" }
assert my_solution.minimumString(**test_input) == "bcc"

test_input = { "a": "ba", "b": "b", "c": "c" }
assert my_solution.minimumString(**test_input) == "bac"

test_input = { "a": "aa", "b": "c", "c": "c" }
assert my_solution.minimumString(**test_input) == "aac"

test_input = { "a": "c", "b": "bc", "c": "c" }
assert my_solution.minimumString(**test_input) == "bc"

test_input = { "a": "c", "b": "ca", "c": "c" }
assert my_solution.minimumString(**test_input) == "ca"

test_input = { "a": "c", "b": "cb", "c": "c" }
assert my_solution.minimumString(**test_input) == "cb"

test_input = { "a": "c", "b": "c", "c": "cc" }
assert my_solution.minimumString(**test_input) == "cc"

test_input = { "a": "ca", "b": "c", "c": "a" }
assert my_solution.minimumString(**test_input) == "ca"