mirror of
https://gitee.com/coder-xiaomo/leetcode-problemset
synced 2025-09-05 23:41:41 +08:00
存量题库数据更新
This commit is contained in:
@@ -6,13 +6,13 @@
|
||||
"boundTopicId": null,
|
||||
"title": "Big Countries",
|
||||
"titleSlug": "big-countries",
|
||||
"content": "<p>Table: <code>World</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| name | varchar |\n| continent | varchar |\n| area | int |\n| population | int |\n| gdp | int |\n+-------------+---------+\nname is the primary key column for this table.\nEach row of this table gives information about the name of a country, the continent to which it belongs, its area, the population, and its GDP value.\n</pre>\n\n<p> </p>\n\n<p>A country is <strong>big</strong> if:</p>\n\n<ul>\n\t<li>it has an area of at least three million (i.e., <code>3000000 km<sup>2</sup></code>), or</li>\n\t<li>it has a population of at least twenty-five million (i.e., <code>25000000</code>).</li>\n</ul>\n\n<p>Write an SQL query to report the name, population, and area of the <strong>big countries</strong>.</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The query result format is in the following example.</p>\n\n<p> </p>\n<p><strong>Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nWorld table:\n+-------------+-----------+---------+------------+--------------+\n| name | continent | area | population | gdp |\n+-------------+-----------+---------+------------+--------------+\n| Afghanistan | Asia | 652230 | 25500100 | 20343000000 |\n| Albania | Europe | 28748 | 2831741 | 12960000000 |\n| Algeria | Africa | 2381741 | 37100000 | 188681000000 |\n| Andorra | Europe | 468 | 78115 | 3712000000 |\n| Angola | Africa | 1246700 | 20609294 | 100990000000 |\n+-------------+-----------+---------+------------+--------------+\n<strong>Output:</strong> \n+-------------+------------+---------+\n| name | population | area |\n+-------------+------------+---------+\n| Afghanistan | 25500100 | 652230 |\n| Algeria | 37100000 | 2381741 |\n+-------------+------------+---------+\n</pre>\n",
|
||||
"content": "<p>Table: <code>World</code></p>\n\n<pre>\n+-------------+---------+\n| Column Name | Type |\n+-------------+---------+\n| name | varchar |\n| continent | varchar |\n| area | int |\n| population | int |\n| gdp | bigint |\n+-------------+---------+\nname is the primary key (column with unique values) for this table.\nEach row of this table gives information about the name of a country, the continent to which it belongs, its area, the population, and its GDP value.\n</pre>\n\n<p> </p>\n\n<p>A country is <strong>big</strong> if:</p>\n\n<ul>\n\t<li>it has an area of at least three million (i.e., <code>3000000 km<sup>2</sup></code>), or</li>\n\t<li>it has a population of at least twenty-five million (i.e., <code>25000000</code>).</li>\n</ul>\n\n<p>Write a solution to find the name, population, and area of the <strong>big countries</strong>.</p>\n\n<p>Return the result table in <strong>any order</strong>.</p>\n\n<p>The result format is in the following example.</p>\n\n<p> </p>\n<p><strong class=\"example\">Example 1:</strong></p>\n\n<pre>\n<strong>Input:</strong> \nWorld table:\n+-------------+-----------+---------+------------+--------------+\n| name | continent | area | population | gdp |\n+-------------+-----------+---------+------------+--------------+\n| Afghanistan | Asia | 652230 | 25500100 | 20343000000 |\n| Albania | Europe | 28748 | 2831741 | 12960000000 |\n| Algeria | Africa | 2381741 | 37100000 | 188681000000 |\n| Andorra | Europe | 468 | 78115 | 3712000000 |\n| Angola | Africa | 1246700 | 20609294 | 100990000000 |\n+-------------+-----------+---------+------------+--------------+\n<strong>Output:</strong> \n+-------------+------------+---------+\n| name | population | area |\n+-------------+------------+---------+\n| Afghanistan | 25500100 | 652230 |\n| Algeria | 37100000 | 2381741 |\n+-------------+------------+---------+\n</pre>\n",
|
||||
"translatedTitle": null,
|
||||
"translatedContent": null,
|
||||
"isPaidOnly": false,
|
||||
"difficulty": "Easy",
|
||||
"likes": 800,
|
||||
"dislikes": 904,
|
||||
"likes": 2403,
|
||||
"dislikes": 1266,
|
||||
"isLiked": null,
|
||||
"similarQuestions": "[]",
|
||||
"exampleTestcases": "{\"headers\": {\"World\": [\"name\", \"continent\",\t\"area\",\t\"population\", \"gdp\"]}, \"rows\": {\"World\": [[\"Afghanistan\", \"Asia\", 652230, 25500100, 20343000000], [\"Albania\", \"Europe\", 28748, 2831741, 12960000000], [\"Algeria\", \"Africa\", 2381741, 37100000, 188681000000], [\"Andorra\", \"Europe\", 468, 78115,\t3712000000], [\"Angola\", \"Africa\", 1246700, 20609294, 100990000000]]}}",
|
||||
@@ -45,9 +45,21 @@
|
||||
"langSlug": "oraclesql",
|
||||
"code": "/* Write your PL/SQL query statement below */\n",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "Pandas",
|
||||
"langSlug": "pythondata",
|
||||
"code": "import pandas as pd\n\ndef big_countries(world: pd.DataFrame) -> pd.DataFrame:\n ",
|
||||
"__typename": "CodeSnippetNode"
|
||||
},
|
||||
{
|
||||
"lang": "PostgreSQL",
|
||||
"langSlug": "postgresql",
|
||||
"code": "-- Write your PostgreSQL query statement below\n",
|
||||
"__typename": "CodeSnippetNode"
|
||||
}
|
||||
],
|
||||
"stats": "{\"totalAccepted\": \"281.2K\", \"totalSubmission\": \"364.8K\", \"totalAcceptedRaw\": 281229, \"totalSubmissionRaw\": 364785, \"acRate\": \"77.1%\"}",
|
||||
"stats": "{\"totalAccepted\": \"900.8K\", \"totalSubmission\": \"1.3M\", \"totalAcceptedRaw\": 900805, \"totalSubmissionRaw\": 1316610, \"acRate\": \"68.4%\"}",
|
||||
"hints": [],
|
||||
"solution": {
|
||||
"id": "200",
|
||||
@@ -59,11 +71,11 @@
|
||||
},
|
||||
"status": null,
|
||||
"sampleTestCase": "{\"headers\": {\"World\": [\"name\", \"continent\",\t\"area\",\t\"population\", \"gdp\"]}, \"rows\": {\"World\": [[\"Afghanistan\", \"Asia\", 652230, 25500100, 20343000000], [\"Albania\", \"Europe\", 28748, 2831741, 12960000000], [\"Algeria\", \"Africa\", 2381741, 37100000, 188681000000], [\"Andorra\", \"Europe\", 468, 78115,\t3712000000], [\"Angola\", \"Africa\", 1246700, 20609294, 100990000000]]}}",
|
||||
"metaData": "{\n \"mysql\": [\n \"Create table If Not Exists World (name varchar(255), continent varchar(255), area int, population int, gdp int)\"\n ],\n \"mssql\": [\n \"Create table World (name varchar(255), continent varchar(255), area int, population int, gdp bigint)\"\n ],\n \"oraclesql\": [\n \"Create table World (name varchar(255), continent varchar(255), area int, population int, gdp int)\"\n ],\n \"database\": true\n}",
|
||||
"metaData": "{\"mysql\": [\"Create table If Not Exists World (name varchar(255), continent varchar(255), area int, population int, gdp bigint)\"], \"mssql\": [\"Create table World (name varchar(255), continent varchar(255), area int, population int, gdp bigint)\"], \"oraclesql\": [\"Create table World (name varchar(255), continent varchar(255), area int, population int, gdp int)\"], \"database\": true, \"name\": \"big_countries\", \"pythondata\": [\"World = pd.DataFrame([], columns=['name', 'continent', 'area', 'population', 'gdp']).astype({'name':'object', 'continent':'object', 'area':'Int64', 'population':'Int64', 'gdp':'Int64'})\"], \"manual\": false, \"postgresql\": [\"Create table If Not Exists World (name varchar(255), continent varchar(255), area int, population int, gdp bigint)\"], \"database_schema\": {\"World\": {\"name\": \"VARCHAR(255)\", \"continent\": \"VARCHAR(255)\", \"area\": \"INT\", \"population\": \"INT\", \"gdp\": \"BIGINT\"}}}",
|
||||
"judgerAvailable": true,
|
||||
"judgeType": "large",
|
||||
"mysqlSchemas": [
|
||||
"Create table If Not Exists World (name varchar(255), continent varchar(255), area int, population int, gdp int)",
|
||||
"Create table If Not Exists World (name varchar(255), continent varchar(255), area int, population int, gdp bigint)",
|
||||
"Truncate table World",
|
||||
"insert into World (name, continent, area, population, gdp) values ('Afghanistan', 'Asia', '652230', '25500100', '20343000000')",
|
||||
"insert into World (name, continent, area, population, gdp) values ('Albania', 'Europe', '28748', '2831741', '12960000000')",
|
||||
@@ -74,7 +86,7 @@
|
||||
"enableRunCode": true,
|
||||
"enableTestMode": false,
|
||||
"enableDebugger": false,
|
||||
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"]}",
|
||||
"envInfo": "{\"mysql\": [\"MySQL\", \"<p><code>MySQL 8.0</code>.</p>\"], \"mssql\": [\"MS SQL Server\", \"<p><code>mssql server 2019</code>.</p>\"], \"oraclesql\": [\"Oracle\", \"<p><code>Oracle Sql 11.2</code>.</p>\"], \"pythondata\": [\"Pandas\", \"<p>Python 3.10 with Pandas 2.0.2 and NumPy 1.25.0</p>\"], \"postgresql\": [\"PostgreSQL\", \"<p>PostgreSQL 16</p>\"]}",
|
||||
"libraryUrl": null,
|
||||
"adminUrl": null,
|
||||
"challengeQuestion": null,
|
||||
|
Reference in New Issue
Block a user