Skip to content

Commit

Permalink
Create Problem9.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
ditekunov authored Jun 15, 2018
1 parent 375300a commit c1fdcdb
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions scala/Problem9.scala
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
object Main extends App {

//O(n^3)
def task =
for {
a <- 1 until 1000
b <- a until 1000
c <- b until 1000
if a * a + b * b == c * c && a + b + c == 1000
} yield a * b * c
print(task.head)
}

0 comments on commit c1fdcdb

Please sign in to comment.