38
\$\begingroup\$

Note: This is the cops' thread, where one should post the scrambled code. Here is the robbers' thread where the cracked source should be posted and linked to the cop's answer.


Task: Write the shortest safe program which multiplies the square root of an integer n by the square of n

This is , so the rules are:

  • In your answer, post a scrambled version of your source code (the characters should be written in any order). The scrambled version should not work!
  • You can take input in any standard way, the same goes for output. Hardcoding is forbidden
  • After the code is cracked by the robbers (if this happens), you must mention that your code has been cracked in your title and add a spoiler to your answer's body with your exact code
  • The same applies to safe answers (mention that it's safe and add the spoiler )
  • The code is considered safe if nobody has cracked it in 5 days after posting it and you can optionally specify that in the title
  • You must specify your programming language
  • You should specify your byte count
  • You must state the rounding mechanism in your answer (see below)

You can assume that the result is lower than 232 and n is always positive. If the result is an integer, you must return the exact value with or without a decimal point; otherwise the minimum decimal precision will be 3 decimal places with any rounding mechanism of your choice, but can include more. You must state the rounding mechanism in your answer. You are not allowed to return as fractions (numerator, denominator pairs - sorry, Bash!)

Examples:

In -> Out
4 -> 32.0 (or 32)
6 -> 88.18163074019441 (or 88.182 following the rules above)
9 -> 243.0
25 -> 3125.0

The shortest safe answer by the end of April will be considered the winner.

asked Apr 3, 2017 at 12:47
\$\endgroup\$
25
  • 2
    \$\begingroup\$ Related. (Same CnR rules, different task.) \$\endgroup\$ Commented Apr 3, 2017 at 12:57
  • 3
    \$\begingroup\$ @MartinEnder If the task is the only thing differing, then isn't it a duplicate? \$\endgroup\$ Commented Apr 3, 2017 at 14:48
  • 1
    \$\begingroup\$ @NathanMerrill I don't know, I don't think we have any established duplicate guidelines for cops and robbers challenge, but if I ask a new code-golf challenge, where the "only" thing that's different from a previous code golf is the task, it's usually not considered a duplicate. ;) (That said, I agree that CnRs are probably more interesting if we change up the CnR-part of the challenge, not the underlying task.) \$\endgroup\$ Commented Apr 3, 2017 at 14:50
  • 1
    \$\begingroup\$ Good luck everyone! I am really glad that you have decided to reopen this. Looking forward to see interesting answers! \$\endgroup\$ Commented Apr 3, 2017 at 15:23
  • 2
    \$\begingroup\$ I had written my code to work for an input up to 2^32... Which is why I asked about rounding errors, got rather off the mark at that point \$\endgroup\$ Commented Apr 3, 2017 at 16:19

68 Answers 68

1
2 3
20
\$\begingroup\$

Python 3, 44 bytes (cracked)

'**:(((paraboloid / rabid,mad,immoral))):**'

No rounding. Floating point accuracy.

a spaghetto
11.3k3 gold badges48 silver badges83 bronze badges
answered Apr 8, 2017 at 16:13
\$\endgroup\$
2
  • 5
    \$\begingroup\$ Come on, this deserves more points, it's so creative! There is symmetry, and all words are real words. \$\endgroup\$ Commented Apr 8, 2017 at 18:12
  • 1
    \$\begingroup\$ If I didn't make any silly mistakes... Cracked \$\endgroup\$ Commented Apr 12, 2017 at 14:17
11
\$\begingroup\$

MATL, 12 bytes (cracked by @tehtmi)

'Un&0P'/^:+1

No rounding; uses floating point.

Intended solution (different from that found by @tehtmi):

:&+n10U'P'/^

Explanation

:&+ % Create a matrix of size n ×ばつ n, where n is implicit input
n % Number of elements. Gives n^2
10U % 10 squared. Gives 100
'P' % 'P' (ASCII code 80)
/ % Divide. Gives 1.25
^ % Power. Implicit display

answered Apr 3, 2017 at 17:06
\$\endgroup\$
2
  • 1
    \$\begingroup\$ Crack? \$\endgroup\$ Commented Apr 6, 2017 at 5:16
  • \$\begingroup\$ @tehtmi Indeed! Well done! My intended solution was different; I just posted it \$\endgroup\$ Commented Apr 6, 2017 at 9:20
10
\$\begingroup\$

Röda, 28 bytes (Cracked by @tehtmi)

 (),.025^^cdfhnnnopprstuu{|}

Note the space at the beginning. No rounding, but it uses floating point numbers so precision is limited.

answered Apr 3, 2017 at 15:29
\$\endgroup\$
3
  • \$\begingroup\$ Is this an anonymous function, or a "full" function? \$\endgroup\$ Commented Apr 3, 2017 at 16:12
  • \$\begingroup\$ @KritixiLithos if the cop does not want to give clues, it is not supposed to \$\endgroup\$ Commented Apr 3, 2017 at 16:15
  • \$\begingroup\$ Cracked? \$\endgroup\$ Commented Apr 6, 2017 at 4:16
10
\$\begingroup\$

Perl, 42 bytes (Safe)

There are 41 bytes of code and -p flag (no other flags).

/"/4~~r..rso4r<_4ドルva=eg1de|i/h0-&$c={}l+"

The result isn't rounded (or rather rounded up to the same point Perl would have round up by doing $_ = (sqrt $_) * ($_ ** 2)).

Solution:

$_=eval".i44<4}{|~"=~s/./chr-10+ord$\&/gre
(without the \ before the & - markdown spoiler seems to dislike $ followed by &)
Try it online!

Explanation:

.i44<4}{|~ is $_**2*sqrt but with every character replaced by the character with its ascii code + 10. (ascii code of $ is 36, so it becomes . whose ascii code is 46, etc.).
The purpose of s/./chr-10+ord$\&/gre is then to undo this transformation: it replaces each character by the character with ascii code 10 lower. (chr-10+ord$\& is probably clearer as chr(ord($\&)-10) where chr returns the character corresponding to an ascii code, and ord returns the ascii code corresponding to a character).
finally, eval evaluates this string, and thus computes the result, which is stored in $_, which is implicitly printed at the end thanks to -p flag.

answered Apr 3, 2017 at 15:33
\$\endgroup\$
4
  • \$\begingroup\$ True. I was trying to edit quickly because I saw 4 reopen votes and hoped to get the question fixed before the 5th was cast. If the question had been left in the sandbox until it was ready, it would have been better for all involved. \$\endgroup\$ Commented Apr 3, 2017 at 15:57
  • \$\begingroup\$ @PeterTaylor Sure, no problem, and anyway it was bold so fairly visible (I wasn't blaming anyone, but merely pointing a minor flow (that I corrected right away (introducing typos in the process))). And I couldn't agree more about the sandbox part. \$\endgroup\$ Commented Apr 3, 2017 at 16:04
  • \$\begingroup\$ can you explain it a bit? \$\endgroup\$ Commented Apr 5, 2017 at 6:47
  • \$\begingroup\$ @LưuVĩnhPhúc You mean if I can give you a little bit of help to crack it? mmh... the code starts with $_=. And there is a eval somewhere. (that's not a lot but I feel I can't give you more without giving you too much information) \$\endgroup\$ Commented Apr 7, 2017 at 9:24
8
\$\begingroup\$

Octave, 43 bytes (Safe)

$'()*+,-/23579:[]aelnouv'*,-23:[]lu',-23]',

This is a script that requires input from the command line (it's not a function). It's floating point accuracy (so no rounding).

Solution:

eval(-[5,-2:3,-3:2]+['nlouu*$$',39,']2/7'])

Explanation:

eval( <string> ) % Evaluated the string inside the brackets and executes it
Everything inside the eval call gets evaluated to input('')^2.5

How?

-[5,-2:3,-3:2] % A vector: [-5, 2, 1, 0, -1, -2, -3, 3, 2, 1, 0, -1, -2]
['nlouu**$$',39,']2/7'] % This is a string: nlouu**$ concatenated with the number
. % 39 (ASCII ']'), and ']2/7'. Thus, combined: 'nlouu**$$']2/7'

Adding the first vector to this string will convert it to the integer vector:
[105, 110, 112, 117, 116, 40, 39, 39, 41, 94, 50, 46, 53]

eval implicitly converts this to a string, and these numbers just so happens to be: input('')^2.5

answered Apr 3, 2017 at 18:22
\$\endgroup\$
1
  • 1
    \$\begingroup\$ This was hard. Well done! \$\endgroup\$ Commented Apr 9, 2017 at 2:08
7
\$\begingroup\$

C, 50 bytes (Cracked by fergusq)

%(()) ,-12225;>\\aaabbdddeeefffllnoooprrttuuuuw{

Uses standard IEEE754 rounding. As noted by fergusq's answer, may require -lm depending on your compiler.

answered Apr 3, 2017 at 21:53
\$\endgroup\$
3
  • \$\begingroup\$ Cracked? \$\endgroup\$ Commented Apr 4, 2017 at 8:33
  • \$\begingroup\$ @fergusq correct, and almost exactly what I had. Well done; I thought I'd left enough red-herrings in there to keep people busy a lot longer! \$\endgroup\$ Commented Apr 4, 2017 at 11:56
  • \$\begingroup\$ @Dave Wow, that looks like a syntax error at first. \$\endgroup\$ Commented Apr 4, 2017 at 17:08
6
\$\begingroup\$

Mathematica, 131 bytes, non-competing?, cracked

This has been cracked by @lanlock4 ! However, I still have internet points to bestow on someone who finds the original solution, where all the characters are actually needed....

f[y_]:=With[{x=@@@@@@#####^^&&&(((()))){{}}111111,,+-/y},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]

This is intended as a puzzle. Although you may use the above characters however you want, I certainly intend for the answer to follow the form

f[y_]:=With[{x=
 @@@@@@#####^^&&&(((()))){{}}111111,,+-/y
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]

where the first and third lines are just a wrapper to make the rounding and display legal (it writes every output to exactly three decimal places, rounded), and the second line is the scrambled version of the guts of the code. Sample outputs:

6 -> 88.182
9 -> 243.000
9999 -> 9997500187.497

(Mathematica is non-free software, but there is a Wolfram sandbox where it is possible to test modest amounts of code. For example, cutting and pasting the code

f[y_]:=With[{x=
 y^2.5
},Print[#,".",IntegerString[Round@#2,10,3]]&@@QuotientRemainder[1000x,1000]]

defines a function, which you can subsequently call like f@6 or f[9], that does the same thing as the unscrambled version of the code above. So does this really have to be non-competing?)

answered Apr 3, 2017 at 19:16
\$\endgroup\$
1
  • \$\begingroup\$ Cracked it! \$\endgroup\$ Commented Apr 4, 2017 at 0:50
6
\$\begingroup\$

Swift - 64 bytes (Safe)

prot Fdnufi;nooitamunc xetgru(->atl)Ior:n{tFn pg,F(ao.o25t)(w)l}

No rounding, and displays a .0 even if the result is an integer.

answered Apr 3, 2017 at 15:42
\$\endgroup\$
4
\$\begingroup\$

Haskell, 16 bytes (Cracked by @nimi)

()*...25=eglopxx

No particular rounding

answered Apr 3, 2017 at 17:37
\$\endgroup\$
0
4
\$\begingroup\$

R, 28 bytes (Cracked by @Flounderer)

funny(p1)-tio(^*^)/pc(2)<p2;

Standard R floating-point accuracy.

answered Apr 3, 2017 at 18:44
\$\endgroup\$
2
  • \$\begingroup\$ Is this it? codegolf.stackexchange.com/a/115132/26905 \$\endgroup\$ Commented Apr 3, 2017 at 22:31
  • \$\begingroup\$ @Flounderer Yes, it is. \$\endgroup\$ Commented Apr 3, 2017 at 23:05
4
\$\begingroup\$

C#, 172 bytes (Cracked by SLuck49)

 (((((())))))***,,,,......1225;;;;;;<====>CFLMMMMMPPPRSSSSSWaaaaaaabbbbcccddddddeeeeeeeeeeegghiiiiiiiillllllmmnnnnnnnooooooooqqqqrrrssssssssstttttttttuuuuuuuvvwyy{{}}

This code is a full program.

There are seven space characters at the start.

The input is read form STDIN and printed to STDOUT. The result is in double, no rounding done.

Original Code ungolfed:

using System;
using S = System.Console;
class P
{
 static void Main()
 {
 var t = S.ReadLine();
 double q = int.Parse(t);
 Func<double, double, double> M = Math.Pow;
 S.Write(M(q, 2 * .25) * M(q * q, 1));
 }
}
answered Apr 3, 2017 at 16:58
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$ Commented Apr 5, 2017 at 15:06
4
\$\begingroup\$

Ohm, 11 bytes

M n¡D1⁄41⁄2;+1I

Use with -c flag. Uses CP-437 encoding.

answered Apr 4, 2017 at 11:58
\$\endgroup\$
12
  • \$\begingroup\$ I'm sorry, but are you quite sure this is correct? \$\endgroup\$ Commented Apr 7, 2017 at 20:51
  • \$\begingroup\$ Now that no one has cracked it in the imparted time, mind sharing your solution please? I'm very curious :) \$\endgroup\$ Commented Apr 10, 2017 at 0:51
  • \$\begingroup\$ For now, this is the shortest answer considered safe. I will accept it, but if you do not post your original code in 5 days, I will uncheck this, since I am not sure this is possible. EAGER too see your solution \$\endgroup\$ Commented May 1, 2017 at 16:23
  • 2
    \$\begingroup\$ @RomanGräf try to find your solution, please. Otherwise I will uncheck this... \$\endgroup\$ Commented May 6, 2017 at 10:37
  • 1
    \$\begingroup\$ @RomanGräf : ping? Still very eager to see that solution :) \$\endgroup\$ Commented May 9, 2017 at 4:41
3
\$\begingroup\$

JavaScript (ES7), 20 bytes (Cracked by @IlmariKaronen)

****..22255666=>____

Standard JavaScript precision.

answered Apr 3, 2017 at 21:44
\$\endgroup\$
2
  • \$\begingroup\$ Cracked. (Oops, posted in the wrong thread at first.) \$\endgroup\$ Commented Apr 3, 2017 at 23:56
  • \$\begingroup\$ Such a clever approach! +1 :) \$\endgroup\$ Commented Apr 5, 2017 at 10:01
3
\$\begingroup\$

Python 2, 60 Bytes (Cracked by @notjagan)

 3n0)4 5)594p3(p5*5i9t4542)0/*((8(t.84- 90945 u)i*48/95n8r8

No rounding involved. Accurate up to 10 decimal digits.

answered Apr 3, 2017 at 20:46
\$\endgroup\$
1
  • \$\begingroup\$ Cracked! \$\endgroup\$ Commented Apr 3, 2017 at 23:43
3
\$\begingroup\$

Python 3.6, 59 bytes

ba(,b5,d' (,a/([m:'-)oa)(bl*aadplma dba](r)d )l*d,:)*m:-mml

No rounding. Floating point accuracy.

answered Apr 4, 2017 at 3:09
\$\endgroup\$
1
  • \$\begingroup\$ Really, 3 lambdas? \$\endgroup\$ Commented Apr 5, 2017 at 15:48
3
\$\begingroup\$

Haskell, 64 bytes, (cracked by Laikoni)

$$$$$$(((((())))))**,...0<<<>>>[]cccccdddeffiiiiilloopppprrsstuu

Standard Haskell floating point operations.

My original version is:

product.((($succ$cos0ドル)(flip(**).)[id,recip])).flip(id)

answered Apr 3, 2017 at 21:28
\$\endgroup\$
2
  • \$\begingroup\$ Cracked! \$\endgroup\$ Commented Apr 4, 2017 at 14:13
  • \$\begingroup\$ @Laikoni: well done! \$\endgroup\$ Commented Apr 4, 2017 at 14:21
3
\$\begingroup\$

Fourier, (削除) 124 (削除ここまで) 119 Bytes

((()))*******--011111<=>>>HHINNNN^^^eeehhhhkkkkmmmmmmmmmmmmmmmmossuuuuuuuuuuuuuuuuu{{{{{{{{{{}}}}}}}}}}~~~~~~~~~~~~~~~~

There are no whitespaces or newline characters.

Square root is rounded to the nearest whole number because Fourier doesn't seem to handle anything other than integers (and since @ATaco got permission, I hope this is ok)

fixed an editing mistake, if you were already cracking this, the previous was functional

Realized that I had misunderstood part of the code, and was using more characters than I needed to

If I missed anything let me know

answered Apr 4, 2017 at 5:19
\$\endgroup\$
3
\$\begingroup\$

Inform 7, 71 bytes (Cracked by @Ilmari Karonen)

""()**-..:[]
 RT
aaaabeeeffilmmnnnnnooooooqrrrrrssstuuy

The code includes 17 spaces and 2 new lines. This is a full Infrom 7 program defining a function that prints the result with a precision of 5 decimal places.

answered Apr 3, 2017 at 21:08
\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$ Commented Apr 3, 2017 at 22:59
3
\$\begingroup\$

R, 19 bytes (Cracked by @Steadybox)

mensana(4*5*c(.1)):

Standard rounding

R, 33 bytes (Cracked by @plannapus)

(rofl(17)^coins(2*e)/pisan(10))--

R, 31 bytes (Cracked by @plannapus)

h=f`l`u`n`c`t`i`o`n([],[])^(.9)

answered Apr 3, 2017 at 22:45
\$\endgroup\$
3
  • \$\begingroup\$ Cracked the 19-byte answer. \$\endgroup\$ Commented Apr 3, 2017 at 23:16
  • \$\begingroup\$ Cracked the 33-byte solution. \$\endgroup\$ Commented Apr 4, 2017 at 14:50
  • \$\begingroup\$ Cracked the 31-byte solution! \$\endgroup\$ Commented Apr 10, 2017 at 8:28
3
\$\begingroup\$

Octave, 30 bytes (Safe)

(((((())))))**++/:@eeeiiijmsu~

A bit simpler than my first one. Shouldn't be too hard, but it's hopefully a fun puzzle.

answered Apr 4, 2017 at 9:43
\$\endgroup\$
2
  • 2
    \$\begingroup\$ No ^? Hmmm... \$\endgroup\$ Commented Apr 4, 2017 at 9:53
  • 1
    \$\begingroup\$ Came up with this @(e)(e**((i/(i+i))+~sum(e:j))) but it's only n^1.5...this one's tricky. \$\endgroup\$ Commented Apr 9, 2017 at 0:47
2
\$\begingroup\$

05AB1E, 20 bytes - safe

Another totally different approach from my previous answers.

****++/133DDFPTs}11Ð

No rounding.

Example runs

In -> Out
0 -> 0
4 -> 32.0
6 -> 88.18163074019441
25 -> 3125.0
7131 -> 4294138928.896773

I have no doubt @Emigna is going to crack it in a jiffy, but eh, one has to try! :-D


Solution

D1TFÐ*D13*+s3*1+/*}P

This is using the fact that this sequence:

u_0 = 1, u_{n+1} = u_n * (u_n ^ 2 + 3 x) / (3 u_n ^ 2 + x)

converges to sqrt(x), and cubically fast at that (sorry, didn't find how to format math equations in PCG).

Detailed explanation

D1TFÐ*D13*+s3*1+/*}P
D1 # Duplicate the input, then push a 1: stack is now [x, x, 1] (where x is the input)
 TF # 10 times (enough because of the cubic convergence) do
 Ð # triplicate u_n
 * # compute u_n ^ 2
 D # and duplicate it
 13*+ # compute u_n ^ 2 + 3 x
 s # switch that last term with the second copy of u_n ^ 2
 3*1+ # compute 3 u_n ^ 2 + x
 / # compute the ratio (u_n ^ 2 + 3 x) / (3 u_n ^ 2 + x)
 * # compute u_n * (u_n ^ 2 + 3 x) / (3 u_n ^ 2 + x), i.e. u_{n+1}, the next term of the sequence
 } # end of the loop
 P # compute the product of the whole stack, which at that point contains u_10 (a sufficiently good approximation of sqrt(x)), and the 2 copies of the input from the initial D: we get x ^ 2 * sqrt(x)

Try it online!

answered Apr 7, 2017 at 18:02
\$\endgroup\$
2
\$\begingroup\$

OCaml, 13 bytes (Cracked by @Dada)

2*fn-5f>f*u .

No rounding (within IEEE 754 scope).

answered Apr 3, 2017 at 16:57
\$\endgroup\$
1
  • 3
    \$\begingroup\$ cracked. \$\endgroup\$ Commented Apr 3, 2017 at 17:38
2
\$\begingroup\$

Javascript, 123 bytes, Cracked by notjagan

 """"""((((((((()))))))))********,--.....//2;;======>>Seeeeeeegggggggggggghhhhhhhhhhhilllllnnnnnnnnnnorrrsstttttttttttttu{}

This code is a full function

There is one space character at the very start of the list of characters

The rounding of this answer is the floating point precision for Javascript, accuracy is within 10^-6 for every answer.

Got shorter because the precision didn't need to be maintained quite as high as I thought it did.

I had realized that it would be much easier to solve than I initially had made it but it was already there :P

Initial code:

g=t=>t-(t*t-n)/("le".length*t);e=h=>{n=h*h*h*h*h,s=2**(n.toString("ng".length).length/"th".length);return g(g(g(g(g(s)))))}

Newtons method, applied 5 times from the closest power of 2

answered Apr 3, 2017 at 16:05
\$\endgroup\$
2
\$\begingroup\$

Python 3.6 - 52 bytes (Cracked by @xnor)

f=lambda x:x**125*77*8+8/5/((('aafoort.hipie.xml')))

Standard Python rounding

answered Apr 4, 2017 at 0:28
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$ Commented Apr 4, 2017 at 5:11
2
\$\begingroup\$

Ruby, 35 bytes (cracked by xsot)

'a'0-a<2<e<2<l<3<v<4<4<4<5<5<6>7{9}

No rounding. Floating point accuracy.

answered Apr 4, 2017 at 6:31
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$ Commented Apr 4, 2017 at 7:53
2
\$\begingroup\$

05AB1E, 47 bytes

)*.2555BFHIJJKKKPQRST``cgghilnstwx}«11Áöž‚„............

Does not round, uses floating point accuracy.

answered Apr 4, 2017 at 10:34
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$ Commented Apr 4, 2017 at 11:17
2
\$\begingroup\$

CJam, 8 bytes (Cracked by E(削除) n (削除ここまで)mig(削除) m (削除ここまで)na)

WYdYl##+

No rounding. Uses double precision.

answered Apr 4, 2017 at 10:50
\$\endgroup\$
1
  • \$\begingroup\$ Cracked \$\endgroup\$ Commented Apr 4, 2017 at 11:25
2
\$\begingroup\$

R, 32 bytes (Cracked by @plannapus)

i=na*0.5f*n(2*s*cos(t))*22*s*12u

Standard floating-point accuracy.

answered Apr 4, 2017 at 14:13
\$\endgroup\$
1
  • \$\begingroup\$ Cracked. \$\endgroup\$ Commented Apr 4, 2017 at 14:37
2
\$\begingroup\$

Excel, 26 bytes

=(())*//11122AAAIINPQRSST^

No rounding.

Note: As Excel is paid software, this works also in free LibreOffice

answered Apr 4, 2017 at 15:03
\$\endgroup\$
5
  • 1
    \$\begingroup\$ Is there a way to run this without buying Excel? Currently it is the consensus that non free languages cannot be used in cops and robbers. \$\endgroup\$ Commented Apr 4, 2017 at 15:22
  • 1
    \$\begingroup\$ Should work in free Libreoffice, but I'll check and reach back. \$\endgroup\$ Commented Apr 4, 2017 at 15:28
  • 1
    \$\begingroup\$ Works just fine. \$\endgroup\$ Commented Apr 4, 2017 at 15:34
  • \$\begingroup\$ Cracked codegolf.stackexchange.com/questions/115034/… \$\endgroup\$ Commented Apr 4, 2017 at 21:27
  • \$\begingroup\$ @WheatWizard, not relevant anymore, but I think the consensus is: Non-free languages can be used, but should be marked as non-competing. \$\endgroup\$ Commented Apr 5, 2017 at 19:40
2
\$\begingroup\$

RProgN 2, 6 Bytes (Cracked by @notjagan)

š2]^*\

No rounding, displays many decimal places. Does not display any for an integer solution.

answered Apr 3, 2017 at 20:57
\$\endgroup\$
5
  • 2
    \$\begingroup\$ Does this really perform n²√n? I can easily get it to calculate n² + √n, but I can't for the life of me see how you got the terms to multiply. \$\endgroup\$ Commented Apr 4, 2017 at 13:36
  • \$\begingroup\$ @notjagan me too... have been trying for 2 hours to crack it and nothing works. ATaco are you sure that the source is correct? \$\endgroup\$ Commented Apr 4, 2017 at 18:07
  • \$\begingroup\$ @Mr.Xcoder Ah, you're quite correct. Sorry for wasting your collective times! Please see the edited source. \$\endgroup\$ Commented Apr 4, 2017 at 20:51
  • \$\begingroup\$ Now it makes sense! \$\endgroup\$ Commented Apr 4, 2017 at 20:52
  • \$\begingroup\$ A bit late because I was busy, but cracked. \$\endgroup\$ Commented Apr 4, 2017 at 23:03
1
2 3

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.