Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

euler9

  • Loading branch information...
commit 94b255124f9832204e864312ebf9dca8c9eda892 1 parent ab63604
authored

Showing 1 changed file with 20 additions and 0 deletions. Show diff stats Hide diff stats

  1. 20  euler9.scala
20  euler9.scala
... ...
@@ -0,0 +1,20 @@
  1
+object Euler9{
  2
+    def main(args:Array[String])  {
  3
+        // Wrong solution. I misread the question.
  4
+
  5
+
  6
+
  7
+        // Naive brute-force solution
  8
+        // The maximum number can be 32
  9
+        //val numSquared = (1 to 32).map(x => x*x);
  10
+        //numSquared.foreach(a => numSquared.filter(_ > a).foreach(b => numSquared.filter(_ > b).find(c => {
  11
+            //if((a + b + c)==1000){
  12
+                //println (math.sqrt(a * b * c))
  13
+                //true;
  14
+            //}
  15
+            //false;
  16
+            //})));
  17
+    }
  18
+}
  19
+
  20
+// vim: set ts=4 sw=4 et:

0 notes on commit 94b2551

Please sign in to comment.
Something went wrong with that request. Please try again.