From e41399735107fe6ea15dc77b1c0e071153a53e01 Mon Sep 17 00:00:00 2001 From: openset Date: Sun, 8 Dec 2019 19:56:06 +0800 Subject: [PATCH] Add: new --- README.md | 5 + internal/leetcode/question_translation.go | 11 +- .../README.md | 65 ++++++++++ .../README.md | 56 +++++++++ .../README.md | 72 ++++++++++++ problems/students-and-examinations/README.md | 111 ++++++++++++++++++ .../mysql_schemas.sql | 24 ++++ .../README.md | 62 ++++++++++ .../README.md | 2 +- tag/binary-search/README.md | 1 + tag/breadth-first-search/README.md | 1 + tag/greedy/README.md | 1 + tag/math/README.md | 1 + 13 files changed, 403 insertions(+), 9 deletions(-) create mode 100644 problems/find-the-smallest-divisor-given-a-threshold/README.md create mode 100644 problems/group-the-people-given-the-group-size-they-belong-to/README.md create mode 100644 problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/README.md create mode 100644 problems/students-and-examinations/README.md create mode 100644 problems/students-and-examinations/mysql_schemas.sql create mode 100644 problems/subtract-the-product-and-sum-of-digits-of-an-integer/README.md diff --git a/README.md b/README.md index 55bf53546..fe3f1906c 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,11 @@ LeetCode Problems' Solutions | # | Title | Solution | Difficulty | | :-: | - | - | :-: | +| 1284 | [Minimum Number of Flips to Convert Binary Matrix to Zero Matrix](https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix "转化为全零矩阵的最少反转次数") | [Go](https://github.com/openset/leetcode/tree/master/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix) | Hard | +| 1283 | [Find the Smallest Divisor Given a Threshold](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold "使结果不超过阈值的最小除数") | [Go](https://github.com/openset/leetcode/tree/master/problems/find-the-smallest-divisor-given-a-threshold) | Medium | +| 1282 | [Group the People Given the Group Size They Belong To](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to "用户分组") | [Go](https://github.com/openset/leetcode/tree/master/problems/group-the-people-given-the-group-size-they-belong-to) | Medium | +| 1281 | [Subtract the Product and Sum of Digits of an Integer](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer "整数的各位积和之差") | [Go](https://github.com/openset/leetcode/tree/master/problems/subtract-the-product-and-sum-of-digits-of-an-integer) | Easy | +| 1280 | [Students and Examinations](https://leetcode.com/problems/students-and-examinations) 🔒 | [MySQL](https://github.com/openset/leetcode/tree/master/problems/students-and-examinations) | Easy | | 1279 | [Traffic Light Controlled Intersection](https://leetcode.com/problems/traffic-light-controlled-intersection) 🔒 | [Go](https://github.com/openset/leetcode/tree/master/problems/traffic-light-controlled-intersection) | Easy | | 1278 | [Palindrome Partitioning III](https://leetcode.com/problems/palindrome-partitioning-iii "分割回文串 III") | [Go](https://github.com/openset/leetcode/tree/master/problems/palindrome-partitioning-iii) | Hard | | 1277 | [Count Square Submatrices with All Ones](https://leetcode.com/problems/count-square-submatrices-with-all-ones "统计全为 1 的正方形子矩阵") | [Go](https://github.com/openset/leetcode/tree/master/problems/count-square-submatrices-with-all-ones) | Medium | diff --git a/internal/leetcode/question_translation.go b/internal/leetcode/question_translation.go index e9fd5a3cf..b403de568 100644 --- a/internal/leetcode/question_translation.go +++ b/internal/leetcode/question_translation.go @@ -17,12 +17,7 @@ type qtDataType struct { } type translationsType struct { - Title string `json:"title"` - Question questionIDType `json:"question"` - TypeName string `json:"__typename"` -} - -type questionIDType struct { + Title string `json:"title"` QuestionID string `json:"questionId"` TypeName string `json:"__typename"` } @@ -32,7 +27,7 @@ func GetQuestionTranslation() (qt QuestionTranslationType) { jsonStr := `{ "operationName": "getQuestionTranslation", "variables": {}, - "query": "query getQuestionTranslation($lang: String) {\n translations: allAppliedQuestionTranslations(lang: $lang) {\n title\n question {\n questionId\n __typename\n }\n __typename\n }\n}\n" + "query": "query getQuestionTranslation($lang: String) {\n translations: allAppliedQuestionTranslations(lang: $lang) {\n title\n questionId\n __typename\n }\n}\n" }` graphQLRequest(graphQLCnURL, jsonStr, questionTranslationFile, 2, &qt) if qt.Data.Translations == nil { @@ -47,7 +42,7 @@ func GetQuestionTranslation() (qt QuestionTranslationType) { func init() { translation := GetQuestionTranslation() for _, item := range translation.Data.Translations { - id := item.Question.QuestionID + id := item.QuestionID if id, err := strconv.Atoi(id); err == nil { translationSet[id] = item.Title } diff --git a/problems/find-the-smallest-divisor-given-a-threshold/README.md b/problems/find-the-smallest-divisor-given-a-threshold/README.md new file mode 100644 index 000000000..af86b2db7 --- /dev/null +++ b/problems/find-the-smallest-divisor-given-a-threshold/README.md @@ -0,0 +1,65 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/group-the-people-given-the-group-size-they-belong-to "Group the People Given the Group Size They Belong To") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix "Minimum Number of Flips to Convert Binary Matrix to Zero Matrix") + +## [1283. Find the Smallest Divisor Given a Threshold (Medium)](https://leetcode.com/problems/find-the-smallest-divisor-given-a-threshold "使结果不超过阈值的最小除数") + +

Given an array of integers nums and an integer threshold, we will choose a positive integer divisor and divide all the array by it and sum the result of the division. Find the smallest divisor such that the result mentioned above is less than or equal to threshold.

+ +

Each result of division is rounded to the nearest integer greater than or equal to that element. (For example: 7/3 = 3 and 10/2 = 5).

+ +

It is guaranteed that there will be an answer.

+ +

 

+

Example 1:

+ +
+Input: nums = [1,2,5,9], threshold = 6
+Output: 5
+Explanation: We can get a sum to 17 (1+2+5+9) if the divisor is 1. 
+If the divisor is 4 we can get a sum to 7 (1+1+2+3) and if the divisor is 5 the sum will be 5 (1+1+1+2). 
+
+ +

Example 2:

+ +
+Input: nums = [2,3,5,7,11], threshold = 11
+Output: 3
+
+ +

Example 3:

+ +
+Input: nums = [19], threshold = 5
+Output: 4
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Binary Search](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] + +### Hints +
+Hint 1 +Examine every possible number for solution. Choose the largest of them. +
+ +
+Hint 2 +Use binary search to reduce the time complexity. +
diff --git a/problems/group-the-people-given-the-group-size-they-belong-to/README.md b/problems/group-the-people-given-the-group-size-they-belong-to/README.md new file mode 100644 index 000000000..c9a4db1e7 --- /dev/null +++ b/problems/group-the-people-given-the-group-size-they-belong-to/README.md @@ -0,0 +1,56 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/subtract-the-product-and-sum-of-digits-of-an-integer "Subtract the Product and Sum of Digits of an Integer") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/find-the-smallest-divisor-given-a-threshold "Find the Smallest Divisor Given a Threshold") + +## [1282. Group the People Given the Group Size They Belong To (Medium)](https://leetcode.com/problems/group-the-people-given-the-group-size-they-belong-to "用户分组") + +

There are n people whose IDs go from 0 to n - 1 and each person belongs exactly to one group. Given the array groupSizes of length n telling the group size each person belongs to, return the groups there are and the people's IDs each group includes.

+ +

You can return any solution in any order and the same applies for IDs. Also, it is guaranteed that there exists at least one solution. 

+ +

 

+

Example 1:

+ +
+Input: groupSizes = [3,3,3,3,3,1,3]
+Output: [[5],[0,1,2],[3,4,6]]
+Explanation: 
+Other possible solutions are [[2,1,6],[5],[0,4,3]] and [[5],[0,6,2],[4,3,1]].
+
+ +

Example 2:

+ +
+Input: groupSizes = [2,1,3,3,3,2]
+Output: [[1],[0,5],[2,3,4]]
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Greedy](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] + +### Hints +
+Hint 1 +Put people's IDs with same groupSize into buckets, then split each bucket into groups. +
+ +
+Hint 2 +Greedy fill until you need a new group. +
diff --git a/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/README.md b/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/README.md new file mode 100644 index 000000000..9689d7591 --- /dev/null +++ b/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix/README.md @@ -0,0 +1,72 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/find-the-smallest-divisor-given-a-threshold "Find the Smallest Divisor Given a Threshold") +                 +Next > + +## [1284. Minimum Number of Flips to Convert Binary Matrix to Zero Matrix (Hard)](https://leetcode.com/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix "转化为全零矩阵的最少反转次数") + +

Given a m x n binary matrix mat. In one step, you can choose one cell and flip it and all the four neighbours of it if they exist (Flip is changing 1 to 0 and 0 to 1). A pair of cells are called neighboors if they share one edge.

+ +

Return the minimum number of steps required to convert mat to a zero matrix or -1 if you cannot.

+ +

Binary matrix is a matrix with all cells equal to 0 or 1 only.

+ +

Zero matrix is a matrix with all cells equal to 0.

+ +

 

+

Example 1:

+ +
+Input: mat = [[0,0],[0,1]]
+Output: 3
+Explanation: One possible solution is to flip (1, 0) then (0, 1) and finally (1, 1) as shown.
+
+ +

Example 2:

+ +
+Input: mat = [[0]]
+Output: 0
+Explanation: Given matrix is a zero matrix. We don't need to change it.
+
+ +

Example 3:

+ +
+Input: mat = [[1,1,1],[1,0,1],[0,0,0]]
+Output: 6
+
+ +

Example 4:

+ +
+Input: mat = [[1,0,0],[1,0,0]]
+Output: -1
+Explanation: Given matrix can't be a zero matrix
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Breadth-first Search](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] + +### Hints +
+Hint 1 +Flipping same index two times is like not flipping it at all. Each index can be flipped one time. Try all possible combinations. O(2^(n*m)). +
diff --git a/problems/students-and-examinations/README.md b/problems/students-and-examinations/README.md new file mode 100644 index 000000000..9e8f218e8 --- /dev/null +++ b/problems/students-and-examinations/README.md @@ -0,0 +1,111 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/traffic-light-controlled-intersection "Traffic Light Controlled Intersection") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/subtract-the-product-and-sum-of-digits-of-an-integer "Subtract the Product and Sum of Digits of an Integer") + +## [1280. Students and Examinations (Easy)](https://leetcode.com/problems/students-and-examinations "") + +

Table: Students

+
++---------------+---------+
+| Column Name   | Type    |
++---------------+---------+
+| student_id    | int     |
+| student_name  | varchar |
++---------------+---------+
+student_id is the primary key for this table.
+Each row of this table contains the ID and the name of one student in the school.
+
+ +

Table: Subjects

+
++--------------+---------+
+| Column Name  | Type    |
++--------------+---------+
+| subject_name | varchar |
++--------------+---------+
+subject_name is the primary key for this table.
+Each row of this table contains a name of one subject in the school.
+
+ +

Table: Examinations

+
++--------------+---------+
+| Column Name  | Type    |
++--------------+---------+
+| student_id   | int     |
+| subject_name | varchar |
++--------------+---------+
+There is no primary key for this table. It may contain duplicates.
+Each student from Students table takes every course from Subjects table.
+Each row of this table indicates that a student with ID student_id attended the exam of subject_name.
+
+ +Write an SQL query to find the number of times each student attended each exam. + +Order the result table by student_id and subject_name. + +The query result format is in the following example: +
+Students table:
++------------+--------------+
+| student_id | student_name |
++------------+--------------+
+| 1          | Alice        |
+| 2          | Bob          |
+| 13         | John         |
+| 6          | Alex         |
++------------+--------------+
+Subjects table:
++--------------+
+| subject_name |
++--------------+
+| Math         |
+| Physics      |
+| Programming  |
++--------------+
+Examinations table:
++------------+--------------+
+| student_id | subject_name |
++------------+--------------+
+| 1          | Math         |
+| 1          | Physics      |
+| 1          | Programming  |
+| 2          | Programming  |
+| 1          | Physics      |
+| 1          | Math         |
+| 13         | Math         |
+| 13         | Programming  |
+| 13         | Physics      |
+| 2          | Math         |
+| 1          | Math         |
++------------+--------------+
+Result table:
++------------+--------------+--------------+----------------+
+| student_id | student_name | subject_name | attended_exams |
++------------+--------------+--------------+----------------+
+| 1          | Alice        | Math         | 3              |
+| 1          | Alice        | Physics      | 2              |
+| 1          | Alice        | Programming  | 1              |
+| 2          | Bob          | Math         | 1              |
+| 2          | Bob          | Physics      | 0              |
+| 2          | Bob          | Programming  | 1              |
+| 6          | Alex         | Math         | 0              |
+| 6          | Alex         | Physics      | 0              |
+| 6          | Alex         | Programming  | 0              |
+| 13         | John         | Math         | 1              |
+| 13         | John         | Physics      | 1              |
+| 13         | John         | Programming  | 1              |
++------------+--------------+--------------+----------------+
+The result table should contain all students and all subjects.
+Alice attended Math exam 3 times, Physics exam 2 times and Programming exam 1 time.
+Bob attended Math exam 1 time, Programming exam 1 time and didn't attend the Physics exam.
+Alex didn't attend any exam.
+John attended Math exam 1 time, Physics exam 1 time and Programming exam 1 time.
+
diff --git a/problems/students-and-examinations/mysql_schemas.sql b/problems/students-and-examinations/mysql_schemas.sql new file mode 100644 index 000000000..4664a44c1 --- /dev/null +++ b/problems/students-and-examinations/mysql_schemas.sql @@ -0,0 +1,24 @@ +Create table If Not Exists Students (student_id int, student_name varchar(20)); +Create table If Not Exists Subjects (subject_name varchar(20)); +Create table If Not Exists Examinations (student_id int, subject_name varchar(20)); +Truncate table Students; +insert into Students (student_id, student_name) values ('1', 'Alice'); +insert into Students (student_id, student_name) values ('2', 'Bob'); +insert into Students (student_id, student_name) values ('13', 'John'); +insert into Students (student_id, student_name) values ('6', 'Alex'); +Truncate table Subjects; +insert into Subjects (subject_name) values ('Math'); +insert into Subjects (subject_name) values ('Physics'); +insert into Subjects (subject_name) values ('Programming'); +Truncate table Examinations; +insert into Examinations (student_id, subject_name) values ('1', 'Math'); +insert into Examinations (student_id, subject_name) values ('1', 'Physics'); +insert into Examinations (student_id, subject_name) values ('1', 'Programming'); +insert into Examinations (student_id, subject_name) values ('2', 'Programming'); +insert into Examinations (student_id, subject_name) values ('1', 'Physics'); +insert into Examinations (student_id, subject_name) values ('1', 'Math'); +insert into Examinations (student_id, subject_name) values ('13', 'Math'); +insert into Examinations (student_id, subject_name) values ('13', 'Programming'); +insert into Examinations (student_id, subject_name) values ('13', 'Physics'); +insert into Examinations (student_id, subject_name) values ('2', 'Math'); +insert into Examinations (student_id, subject_name) values ('1', 'Math'); diff --git a/problems/subtract-the-product-and-sum-of-digits-of-an-integer/README.md b/problems/subtract-the-product-and-sum-of-digits-of-an-integer/README.md new file mode 100644 index 000000000..d39edd388 --- /dev/null +++ b/problems/subtract-the-product-and-sum-of-digits-of-an-integer/README.md @@ -0,0 +1,62 @@ + + + + + + + +[< Previous](https://github.com/openset/leetcode/tree/master/problems/students-and-examinations "Students and Examinations") +                 +[Next >](https://github.com/openset/leetcode/tree/master/problems/group-the-people-given-the-group-size-they-belong-to "Group the People Given the Group Size They Belong To") + +## [1281. Subtract the Product and Sum of Digits of an Integer (Easy)](https://leetcode.com/problems/subtract-the-product-and-sum-of-digits-of-an-integer "整数的各位积和之差") + +Given an integer number n, return the difference between the product of its digits and the sum of its digits. +

 

+

Example 1:

+ +
+Input: n = 234
+Output: 15 
+Explanation: 
+Product of digits = 2 * 3 * 4 = 24 
+Sum of digits = 2 + 3 + 4 = 9 
+Result = 24 - 9 = 15
+
+ +

Example 2:

+ +
+Input: n = 4421
+Output: 21
+Explanation: 
+Product of digits = 4 * 4 * 2 * 1 = 32 
+Sum of digits = 4 + 4 + 2 + 1 = 11 
+Result = 32 - 11 = 21
+
+ +

 

+

Constraints:

+ + + +### Related Topics + [[Math](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] + +### Hints +
+Hint 1 +How to compute all digits of the number ? +
+ +
+Hint 2 +Use modulus operator (%) to compute the last digit. +
+ +
+Hint 3 +Generalise modulus operator idea to compute all digits. +
diff --git a/problems/traffic-light-controlled-intersection/README.md b/problems/traffic-light-controlled-intersection/README.md index 0e77dc0c8..582b9ae3e 100644 --- a/problems/traffic-light-controlled-intersection/README.md +++ b/problems/traffic-light-controlled-intersection/README.md @@ -7,7 +7,7 @@ [< Previous](https://github.com/openset/leetcode/tree/master/problems/palindrome-partitioning-iii "Palindrome Partitioning III")                  -Next > +[Next >](https://github.com/openset/leetcode/tree/master/problems/students-and-examinations "Students and Examinations") ## [1279. Traffic Light Controlled Intersection (Easy)](https://leetcode.com/problems/traffic-light-controlled-intersection "") diff --git a/tag/binary-search/README.md b/tag/binary-search/README.md index 376a5d2dd..eb96f996e 100644 --- a/tag/binary-search/README.md +++ b/tag/binary-search/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1283 | [使结果不超过阈值的最小除数](https://github.com/openset/leetcode/tree/master/problems/find-the-smallest-divisor-given-a-threshold) | [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Medium | | 1237 | [找出给定方程的正整数解](https://github.com/openset/leetcode/tree/master/problems/find-positive-integer-solution-for-a-given-equation) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Easy | | 1235 | [规划兼职工作](https://github.com/openset/leetcode/tree/master/problems/maximum-profit-in-job-scheduling) | [[排序](https://github.com/openset/leetcode/tree/master/tag/sort/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] [[动态规划](https://github.com/openset/leetcode/tree/master/tag/dynamic-programming/README.md)] | Hard | | 1231 | [分享巧克力](https://github.com/openset/leetcode/tree/master/problems/divide-chocolate) 🔒 | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[二分查找](https://github.com/openset/leetcode/tree/master/tag/binary-search/README.md)] | Hard | diff --git a/tag/breadth-first-search/README.md b/tag/breadth-first-search/README.md index be99a309e..dea2a6a0d 100644 --- a/tag/breadth-first-search/README.md +++ b/tag/breadth-first-search/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1284 | [转化为全零矩阵的最少反转次数](https://github.com/openset/leetcode/tree/master/problems/minimum-number-of-flips-to-convert-binary-matrix-to-zero-matrix) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Hard | | 1263 | [推箱子](https://github.com/openset/leetcode/tree/master/problems/minimum-moves-to-move-a-box-to-their-target-location) | [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Hard | | 1245 | [树的直径](https://github.com/openset/leetcode/tree/master/problems/tree-diameter) 🔒 | [[树](https://github.com/openset/leetcode/tree/master/tag/tree/README.md)] [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Medium | | 1242 | [多线程网页爬虫](https://github.com/openset/leetcode/tree/master/problems/web-crawler-multithreaded) 🔒 | [[深度优先搜索](https://github.com/openset/leetcode/tree/master/tag/depth-first-search/README.md)] [[广度优先搜索](https://github.com/openset/leetcode/tree/master/tag/breadth-first-search/README.md)] | Medium | diff --git a/tag/greedy/README.md b/tag/greedy/README.md index a7dc2558f..212b7ddc1 100644 --- a/tag/greedy/README.md +++ b/tag/greedy/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1282 | [用户分组](https://github.com/openset/leetcode/tree/master/problems/group-the-people-given-the-group-size-they-belong-to) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] | Medium | | 1276 | [不浪费原料的汉堡制作方案](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1253 | [重构 2 行二进制矩阵](https://github.com/openset/leetcode/tree/master/problems/reconstruct-a-2-row-binary-matrix) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1247 | [交换字符使得字符串相同](https://github.com/openset/leetcode/tree/master/problems/minimum-swaps-to-make-strings-equal) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Medium | diff --git a/tag/math/README.md b/tag/math/README.md index 0add6e3e2..eedbb5392 100644 --- a/tag/math/README.md +++ b/tag/math/README.md @@ -9,6 +9,7 @@ | # | 题名 | 标签 | 难度 | | :-: | - | - | :-: | +| 1281 | [整数的各位积和之差](https://github.com/openset/leetcode/tree/master/problems/subtract-the-product-and-sum-of-digits-of-an-integer) | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Easy | | 1276 | [不浪费原料的汉堡制作方案](https://github.com/openset/leetcode/tree/master/problems/number-of-burgers-with-no-waste-of-ingredients) | [[贪心算法](https://github.com/openset/leetcode/tree/master/tag/greedy/README.md)] [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] | Medium | | 1272 | [删除区间](https://github.com/openset/leetcode/tree/master/problems/remove-interval) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[Line Sweep](https://github.com/openset/leetcode/tree/master/tag/line-sweep/README.md)] | Medium | | 1271 | [十六进制魔术数字](https://github.com/openset/leetcode/tree/master/problems/hexspeak) 🔒 | [[数学](https://github.com/openset/leetcode/tree/master/tag/math/README.md)] [[字符串](https://github.com/openset/leetcode/tree/master/tag/string/README.md)] | Easy |