mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-24 22:38:57 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个整数数组 <code>nums</code>,请你找出并返回能被三整除的元素最大和。</p>\n\n<ol>\n</ol>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre><strong>输入:</strong>nums = [3,6,5,1,8]\n<strong>输出:</strong>18\n<strong>解释:</strong>选出数字 3, 6, 1 和 8,它们的和是 18(可被 3 整除的最大和)。</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre><strong>输入:</strong>nums = [4]\n<strong>输出:</strong>0\n<strong>解释:</strong>4 不能被 3 整除,所以无法选出数字,返回 0。\n</pre>\n\n<p><strong>示例 3:</strong></p>\n\n<pre><strong>输入:</strong>nums = [1,2,3,4,4]\n<strong>输出:</strong>12\n<strong>解释:</strong>选出数字 1, 3, 4 以及 4,它们的和是 12(可被 3 整除的最大和)。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= nums.length <= 4 * 10^4</code></li>\n\t<li><code>1 <= nums[i] <= 10^4</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 173,
|
||||
"likes": 175,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -149,7 +149,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"15.8K\", \"totalSubmission\": \"30K\", \"totalAcceptedRaw\": 15844, \"totalSubmissionRaw\": 29966, \"acRate\": \"52.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"16.4K\", \"totalSubmission\": \"31.1K\", \"totalAcceptedRaw\": 16429, \"totalSubmissionRaw\": 31084, \"acRate\": \"52.9%\"}",
|
||||
"hints": [
|
||||
"Represent the state as DP[pos][mod]: maximum possible sum starting in the position \"pos\" in the array where the current sum modulo 3 is equal to mod."
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user