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,12 +12,12 @@
|
||||
"translatedContent": "<p><code>Insurance</code> 表:</p>\n\n<div class=\"original__bRMd\">\n<div>\n<pre>\n+-------------+-------+\n| Column Name | Type |\n+-------------+-------+\n| pid | int |\n| tiv_2015 | float |\n| tiv_2016 | float |\n| lat | float |\n| lon | float |\n+-------------+-------+\npid 是这张表的主键(具有唯一值的列)。\n表中的每一行都包含一条保险信息,其中:\npid 是投保人的投保编号。\ntiv_2015 是该投保人在 2015 年的总投保金额,tiv_2016 是该投保人在 2016 年的总投保金额。\nlat 是投保人所在城市的纬度。题目数据确保 lat 不为空。\nlon 是投保人所在城市的经度。题目数据确保 lon 不为空。</pre>\n\n<p> </p>\n\n<p>编写解决方案报告 2016 年 (<code>tiv_2016</code>) 所有满足下述条件的投保人的投保金额之和:</p>\n\n<ul>\n\t<li>他在 2015 年的投保额 (<code>tiv_2015</code>) 至少跟一个其他投保人在 2015 年的投保额相同。</li>\n\t<li>他所在的城市必须与其他投保人都不同(也就是说 (<code>lat, lon</code>) 不能跟其他任何一个投保人完全相同)。</li>\n</ul>\n\n<p><code>tiv_2016</code> 四舍五入的 <strong>两位小数</strong> 。</p>\n\n<p>查询结果格式如下例所示。</p>\n\n<p> </p>\n\n<p><strong class=\"example\">示例 1:</strong></p>\n\n<pre>\n<strong>输入:</strong>\nInsurance 表:\n+-----+----------+----------+-----+-----+\n| pid | tiv_2015 | tiv_2016 | lat | lon |\n+-----+----------+----------+-----+-----+\n| 1 | 10 | 5 | 10 | 10 |\n| 2 | 20 | 20 | 20 | 20 |\n| 3 | 10 | 30 | 20 | 20 |\n| 4 | 10 | 40 | 40 | 40 |\n+-----+----------+----------+-----+-----+\n<strong>输出:</strong>\n+----------+\n| tiv_2016 |\n+----------+\n| 45.00 |\n+----------+\n<strong>解释:\n</strong>表中的第一条记录和最后一条记录都满足两个条件。\ntiv_2015 值为 10 与第三条和第四条记录相同,且其位置是唯一的。\n\n第二条记录不符合任何一个条件。其 tiv_2015 与其他投保人不同,并且位置与第三条记录相同,这也导致了第三条记录不符合题目要求。\n因此,结果是第一条记录和最后一条记录的 tiv_2016 之和,即 45 。</pre>\n</div>\n</div>\n",
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Medium",
|
||||
"likes": 151,
|
||||
"likes": 175,
|
||||
"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 find_investments(insurance: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"52.2K\", \"totalSubmission\": \"108.9K\", \"totalAcceptedRaw\": 52160, \"totalSubmissionRaw\": 108908, \"acRate\": \"47.9%\"}",
|
||||
"stats": "{\"totalAccepted\": \"68.9K\", \"totalSubmission\": \"142.6K\", \"totalAcceptedRaw\": 68909, \"totalSubmissionRaw\": 142612, \"acRate\": \"48.3%\"}",
|
||||
"hints": [
|
||||
"Make the (LAT, LON) a pair to represent the location information"
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user