7 lines
94 B
Text
7 lines
94 B
Text
func is_perfect(n) {
|
|
n.sigma == 2*n
|
|
}
|
|
|
|
for n in (1..10000) {
|
|
say n if is_perfect(n)
|
|
}
|