计算线段长度

Luogu
IDLGB2030
Time1000ms
Memory128MB
DifficultyP1
顺序结构
已知线段的两个端点的坐标 `A(Xa,Ya)`,`B(Xb ,Yb)` ,求线段 AB 的长度。 ## Input 输入。 共两行。 第一行是两个实数 $Xa,Ya$,即 $A$ 的坐标。 第二行是两个实数 $Xb,Yb$,即 $B$ 的坐标。 输入中所有实数的绝对值均不超过 $10000$。 ## Output 输出。 一个实数,即线段 $AB$ 的长度,保留到小数点后 $3$ 位。 [samples]
Samples
Input #1
1 1
2 2
Output #1
1.414
API Response (JSON)
{
  "problem": {
    "name": "计算线段长度",
    "description": {
      "content": "已知线段的两个端点的坐标 `A(Xa,Ya)`,`B(Xb ,Yb)` ,求线段 AB 的长度。",
      "description_type": "Markdown"
    },
    "platform": "Luogu",
    "limit": {
      "time_limit": 1000,
      "memory_limit": 131072
    },
    "difficulty": {
      "LuoguStyle": "P1"
    },
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "LGB2030"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "已知线段的两个端点的坐标 `A(Xa,Ya)`,`B(Xb\n,Yb)` ,求线段 AB 的长度。\n\n## Input\n\n输入。\n\n共两行。\n\n第一行是两个实数 $Xa,Ya$,即 $A$ 的坐标。\n\n第二行是两个实数 $Xb,Yb$,即 $B$ 的坐标。\n\n输入中所有实数的绝对值均不超过 $10000$。\n\n## Output\n\n输出。\n\n一个实数,即线段 $AB$ 的长度,保留到小数点后 $3$...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments