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*

4
  • \$\begingroup\$ +1 for the god damn clever solution ^^ Could you post, how to assign the test value to the variable n? I don't know Julia at all ;) \$\endgroup\$ Commented Jun 6, 2014 at 7:09
  • \$\begingroup\$ @Knerd - I've edited it in. Hope that helps. \$\endgroup\$ Commented Jun 6, 2014 at 11:12
  • \$\begingroup\$ Minor change - switched variable from n to A to reduce the resultant sum from 988 to 943. \$\endgroup\$ Commented Jun 6, 2014 at 17:22
  • \$\begingroup\$ OK, much bigger change - I realised that you can sum the string directly, rather than extracting the characters with .data; but because they're characters, they produce a character result for an odd number of characters. Multiplication by 1 corrects that. \$\endgroup\$ Commented Jun 6, 2014 at 17:29