Message from C, C++ talks

July 2019

— Is this your homework?

— No, I'm improving my skils on C and I enter to a great website called Kattis.

— Lol

— So this is the assignment


If I were you, I would check that the while loops are never being executed infinitely. Try them with different inputs

— Also, there are lots of nested loops, so my guess that it has to high complexity

— If it's not infinity loops case

— Yes, but what I want is not problem solved, I want some guidance to better development strategies.

— Thanks mate!

— n = n^n is a bit weird; just do = 0

— Asm style :)
but yes it's not needed in C++, compiler is smart enough

— Never done asm. The compiler is smart enough, but I don't and is more difficult to read to me.

— No, I meant you're right

— Can't you move 0 in a reg in asm? Why xor?

— You can, but it some cases xor the register with itself is considered faster, I don't remember details

Message permanent page