mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-22 05:26:46 +08:00
update
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
"translatedContent": "<p>给你一个整数 <code>n</code>(<code>10</code> 进制)和一个基数 <code>k</code> ,请你将 <code>n</code> 从 <code>10</code> 进制表示转换为 <code>k</code> 进制表示,计算并返回转换后各位数字的 <strong>总和</strong> 。</p>\n\n<p>转换后,各位数字应当视作是 <code>10</code> 进制数字,且它们的总和也应当按 <code>10</code> 进制表示返回。</p>\n\n<p> </p>\n\n<p><strong>示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 34, k = 6\n<strong>输出:</strong>9\n<strong>解释:</strong>34 (10 进制) 在 6 进制下表示为 54 。5 + 4 = 9 。\n</pre>\n\n<p><strong>示例 2:</strong></p>\n\n<pre>\n<strong>输入:</strong>n = 10, k = 10\n<strong>输出:</strong>1\n<strong>解释:</strong>n 本身就是 10 进制。 1 + 0 = 1 。\n</pre>\n\n<p> </p>\n\n<p><strong>提示:</strong></p>\n\n<ul>\n\t<li><code>1 <= n <= 100</code></li>\n\t<li><code>2 <= k <= 10</code></li>\n</ul>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 18,
|
||||
"likes": 19,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
@@ -137,7 +137,7 @@
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"9.6K\", \"totalSubmission\": \"12K\", \"totalAcceptedRaw\": 9587, \"totalSubmissionRaw\": 12016, \"acRate\": \"79.8%\"}",
|
||||
"stats": "{\"totalAccepted\": \"9.9K\", \"totalSubmission\": \"12.5K\", \"totalAcceptedRaw\": 9949, \"totalSubmissionRaw\": 12473, \"acRate\": \"79.8%\"}",
|
||||
"hints": [
|
||||
"Convert the given number into base k.",
|
||||
"Use mod-10 to find what each digit is after the conversion and sum the digits."
|
||||
|
Reference in New Issue
Block a user