9 lines
197 B
PowerShell
9 lines
197 B
PowerShell
|
|
for ($a = 1; $a -lt 1000; $a++) {
|
|
for ($b = $a + 1; $b -lt 1000; $b++) {
|
|
$c = [math]::sqrt($a * $a + $b * $b)
|
|
if ($c -eq [math]::floor($c) -and $a + $b + $c -eq 1000) {
|
|
$a, $b, $c
|
|
}
|
|
}
|
|
} |