mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-10-21 21:16:45 +08:00
update
This commit is contained in:
@@ -12,12 +12,12 @@
|
||||
"translatedContent": "<p>表: <code>Employees</code></p>\n\n<pre>\n+-------------+---------+\n| 列名 | 类型 |\n+-------------+---------+\n| employee_id | int |\n| name | varchar |\n| salary | int |\n+-------------+---------+\nemployee_id 是这个表的主键(具有唯一值的列)。\n此表的每一行给出了雇员id ,名字和薪水。\n</pre>\n\n<p> </p>\n\n<p>编写解决方案,计算每个雇员的奖金。如果一个雇员的 id 是 <strong>奇数</strong> 并且他的名字不是以 <code>'M'</code> <strong>开头</strong>,那么他的奖金是他工资的 <code>100%</code> ,否则奖金为 <code>0</code> 。</p>\n\n<p>返回的结果按照 <code>employee_id</code> 排序。</p>\n\n<p>返回结果格式如下面的例子所示。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>\nEmployees 表:\n+-------------+---------+--------+\n| employee_id | name | salary |\n+-------------+---------+--------+\n| 2 | Meir | 3000 |\n| 3 | Michael | 3800 |\n| 7 | Addilyn | 7400 |\n| 8 | Juan | 6100 |\n| 9 | Kannon | 7700 |\n+-------------+---------+--------+\n<strong>输出:</strong>\n+-------------+-------+\n| employee_id | bonus |\n+-------------+-------+\n| 2 | 0 |\n| 3 | 0 |\n| 7 | 7400 |\n| 8 | 0 |\n| 9 | 7700 |\n+-------------+-------+\n<strong>解释:</strong>\n因为雇员id是偶数,所以雇员id 是2和8的两个雇员得到的奖金是0。\n雇员id为3的因为他的名字以'M'开头,所以,奖金是0。\n其他的雇员得到了百分之百的奖金。</pre>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 202,
|
||||
"likes": 209,
|
||||
"dislikes": 0,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"contributors": [],
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python\": false, \"python3\": false, \"mysql\": false, \"mssql\": false, \"oraclesql\": false, \"c\": false, \"csharp\": false, \"javascript\": false, \"typescript\": false, \"bash\": false, \"php\": false, \"swift\": false, \"kotlin\": false, \"dart\": false, \"golang\": false, \"ruby\": false, \"scala\": false, \"html\": false, \"pythonml\": false, \"rust\": false, \"racket\": false, \"erlang\": false, \"elixir\": false, \"pythondata\": false, \"react\": false, \"vanillajs\": false, \"postgresql\": false, \"cangjie\": false}",
|
||||
"langToValidPlayground": "{\"cpp\": false, \"java\": false, \"python3\": false, \"python\": false, \"javascript\": false, \"typescript\": false, \"csharp\": false, \"c\": false, \"golang\": false, \"kotlin\": false, \"swift\": false, \"rust\": false, \"ruby\": false, \"php\": false, \"dart\": false, \"scala\": false, \"elixir\": false, \"erlang\": false, \"racket\": false, \"cangjie\": false, \"bash\": false, \"html\": false, \"pythonml\": false, \"react\": false, \"vanillajs\": false, \"mysql\": false, \"mssql\": false, \"postgresql\": false, \"oraclesql\": false, \"pythondata\": false}",
|
||||
"topicTags": [
|
||||
{
|
||||
"name": "Database",
|
||||
@@ -40,6 +40,12 @@
|
||||
"code": "/* Write your T-SQL query statement below */",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Oracle",
|
||||
"langSlug": "oraclesql",
|
||||
@@ -51,15 +57,9 @@
|
||||
"langSlug": "pythondata",
|
||||
"code": "import pandas as pd\n\ndef calculate_special_bonus(employees: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"104.5K\", \"totalSubmission\": \"170.4K\", \"totalAcceptedRaw\": 104491, \"totalSubmissionRaw\": 170384, \"acRate\": \"61.3%\"}",
|
||||
"stats": "{\"totalAccepted\": \"111.8K\", \"totalSubmission\": \"183.3K\", \"totalAcceptedRaw\": 111751, \"totalSubmissionRaw\": 183290, \"acRate\": \"61.0%\"}",
|
||||
"hints": [],
|
||||
"solution": null,
|
||||
"status": null,
|
||||
|
Reference in New Issue
Block a user