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
  • 1
    \$\begingroup\$ I think you need to add a call to print(). Also, I couldn't get the code to run on TIO as is, I assume it works on some other version of the language not available there? This runs fine on TIO: print(maximum(collect(values(factor(parse(BigInt,readline())))))) \$\endgroup\$ Commented Oct 26, 2017 at 2:28
  • \$\begingroup\$ This works on the interpreter (on my computer, at least). It also causes a warning because initializing a BigInt like that has been deprecated. Nonetheless, if you copy and paste the code as-is into a Julia interpreter, it should work. (if a print is required because it has to explicitly be printed, ill put that in) \$\endgroup\$ Commented Oct 26, 2017 at 2:36
  • 1
    \$\begingroup\$ The print() is needed because the answer needs to be a full program (that displays the output) or a function (that returns the output). Otherwise your solution is fine. It seems that you can save some bytes (and avoid the print) this way: f(x)=maximum(collect(values(factor(x)))) \$\endgroup\$ Commented Oct 26, 2017 at 2:46
  • 1
    \$\begingroup\$ You're welcome! Here's a meta post on what is the allowed format for a solution. \$\endgroup\$ Commented Oct 26, 2017 at 2:58