[传智杯 #3 练习赛] 直角三角形

Luogu
IDLGP8828
Time1000ms
Memory128MB
DifficultyP1
枚举传智杯
一个直角三角形的两个直角边是 $a,b(a\le b)$,其斜边是 $c$,且 $a,b,c$ 都是正整数。 现在我们已经知道了斜边长度 $c$,请问这个直角三角形的两个直角边的长度是什么? ## Input 输入一个整数 $c(1\le c \le 1.41 \times 10^4)$。 ## Output 输出两个整数 $a,b$ 表示答案。保证有整数解。如果有多个可能的答案,请确保 $a$ 尽可能的小。 [samples]
Samples
Input #1
5
Output #1
3 4
API Response (JSON)
{
  "problem": {
    "name": "[传智杯 #3 练习赛] 直角三角形",
    "description": {
      "content": "一个直角三角形的两个直角边是 $a,b(a\\le b)$,其斜边是 $c$,且 $a,b,c$ 都是正整数。 现在我们已经知道了斜边长度 $c$,请问这个直角三角形的两个直角边的长度是什么?",
      "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": "LGP8828"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "一个直角三角形的两个直角边是 $a,b(a\\le b)$,其斜边是 $c$,且 $a,b,c$ 都是正整数。\n\n现在我们已经知道了斜边长度 $c$,请问这个直角三角形的两个直角边的长度是什么?\n\n## Input\n\n输入一个整数 $c(1\\le c \\le 1.41 \\times 10^4)$。\n\n## Output\n\n输出两个整数 $a,b$ 表示答案。保证有整数解。如果有多个可能的答案,请确保...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments