[GESP样题 二级] 勾股数
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目背景
对应的选择、判断题:https://ti.luogu.com.cn/problemset/1102
题目描述
勾股数是很有趣的数学概念。如果三个正整数 ,满足 ,而且 ,我们就将 组成的三元组 称为勾股数。你能通过编程,数数有多少组勾股数,能够满足 吗?
输入格式
输入一行,包含一个正整数 。约定 。
输出格式
输出一行,包含一个整数 ,表示有 组满足条件的勾股数。
5
1
13
3
提示
【样例解释 1】
满足 的勾股数只有 一组。
【样例解释 2】
满足 的勾股数有 组,即 、 和 。
2023级初一上学期非竞赛组期末考(3班)
- Status
- Done
- Rule
- OI
- Problem
- 6
- Start at
- 2023-12-25 14:30
- End at
- 2023-12-25 16:00
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 31