专题文章
时长:00:00更新时间:2024-11-29 08:02:50
program shuixianhuashu。var a.b.c: integer。begin;for a := 1 to 9 do。for b := 0 to 9 do。for c := 0 to 9 do。if a*a*a + b*b*b + c*c*c = 100*a + 10*b + c then。writeln(100*a + 10*b + c)。end。或使用另一种方法。program sxh。var a.b.c.d: integer。begin;for a := 100 to 999 do。begin;b := a mod 10。c := a mod 100 div 10。d := a div 100。if b*b*b + c*c*c + d*d*d = a then。
查看详情