Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

10
  • 1
    \$\begingroup\$ You may rename the args variable to something like z, reducing 6 chars. You may remove the space and the curly braces in the body of the for-loop, reducing 3 chars. You may replace 10000.0 by 1e4, reducing 6 chars. The class does not needs to be public, so you can reduce more 7 chars. This way it will be reduced to 185 characters. \$\endgroup\$ Commented Feb 22, 2014 at 22:07
  • \$\begingroup\$ Is the cast at the end really necessary? It does not for me. \$\endgroup\$ Commented Feb 22, 2014 at 22:13
  • \$\begingroup\$ @Victor Thanks for the good eye, the use of E notation for the 10000.0 double was a spectacularly good idea. By the design of the question, I think it is legit to make this a method instead of a functioning cli class, which would reduce the size considerably. With Java, I didn't think I had a chance, so I erred on the side of functional. \$\endgroup\$ Commented Feb 25, 2014 at 3:28
  • \$\begingroup\$ Welcome to CodeGolf! Don't forget to add an in-answer explanation of how this works! \$\endgroup\$ Commented Feb 25, 2014 at 6:06
  • \$\begingroup\$ @Quincunx, Thanks, made recommended change. \$\endgroup\$ Commented Feb 25, 2014 at 15:42