Toggle navigation
HUSTOJ
F.A.Qs
Web Board
ProblemSet
Source/Category
Status
Ranklist
Contest
Recent
Login
Problem1303--分数之和
1303: 分数之和
Time Limit:
1 Sec
Memory Limit:
128 MB
Submit:
3
Solved:
3
[
Submit
] [
Status
] [
Web Board
] [Creator:
]
Description
求这样的四个自然数p、q、r、s (p<=q<=r<=s),使得以下等式成立: 1/p+1/q+1/r+1/s=1 请输出所有满足上面条件的组合,每行一组,使用printf语句按照格式 "[%2d] 1/%d+1/%d+1/%d+1/%d=1\n" 输出 前面两行应该是: [ 1] 1/2+1/3+1/7+1/42=1 [ 2] 1/2+1/3+1/8+1/24=1
Source/Category