mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-12-20 19:03:47 +08:00
update
This commit is contained in:
@@ -13,10 +13,10 @@
|
||||
<pre>
|
||||
<strong>Input:</strong> n = 10
|
||||
<strong>Output:</strong> 182
|
||||
<strong>Explanation:</strong> There are exactly 3 integers i that satisfy the conditions in the statement:
|
||||
<strong>Explanation:</strong> There are exactly 3 integers i in the range [1, 10] that satisfy the conditions in the statement:
|
||||
- 1 since 1 * 1 = 1
|
||||
- 9 since 9 * 9 = 81 and 81 can be partitioned into 8 + 1.
|
||||
- 10 since 10 * 10 = 100 and 100 can be partitioned into 10 + 0.
|
||||
- 9 since 9 * 9 = 81 and 81 can be partitioned into 8 and 1 with a sum equal to 8 + 1 == 9.
|
||||
- 10 since 10 * 10 = 100 and 100 can be partitioned into 10 and 0 with a sum equal to 10 + 0 == 10.
|
||||
Hence, the punishment number of 10 is 1 + 81 + 100 = 182
|
||||
</pre>
|
||||
|
||||
@@ -25,7 +25,7 @@ Hence, the punishment number of 10 is 1 + 81 + 100 = 182
|
||||
<pre>
|
||||
<strong>Input:</strong> n = 37
|
||||
<strong>Output:</strong> 1478
|
||||
<strong>Explanation:</strong> There are exactly 4 integers i that satisfy the conditions in the statement:
|
||||
<strong>Explanation:</strong> There are exactly 4 integers i in the range [1, 37] that satisfy the conditions in the statement:
|
||||
- 1 since 1 * 1 = 1.
|
||||
- 9 since 9 * 9 = 81 and 81 can be partitioned into 8 + 1.
|
||||
- 10 since 10 * 10 = 100 and 100 can be partitioned into 10 + 0.
|
||||
|
||||
Reference in New Issue
Block a user