This website requires JavaScript.
Explore
Help
Register
Sign in
aparler
/
RosettaCodeData
Watch
1
Star
0
Fork
You've already forked RosettaCodeData
0
Code
Issues
12
Pull requests
3
Projects
Releases
Packages
Wiki
Activity
Actions
2023
RosettaCodeData
/
Task
/
List-comprehensions
/
Ruby
/
list-comprehensions-2.rb
3 lines
69 B
Ruby
Raw
Permalink
Normal View
History
Unescape
Escape
A-M baby
2013-04-10 21:29:02 -07:00
n
=
20
September Morn Update
2019-09-12 10:33:56 -07:00
p
(
1
..
n
)
.
to_a
.
combination
(
3
)
.
select
{
|
a
,
b
,
c
|
a
*
a
+
b
*
b
==
c
*
c
}
Reference in a new issue
Copy permalink