You are viewing a single comment's thread. Return to all comments →
I mean, since we're shortening code...
for (int i=1;i<=n;sum+=(n%i++?0:i-1));
Then you start losing readability. But does look interesting. Just one of those things C# has that Java doesn't.
i have got only so:
@rtmrdnk I'm getting correct result by your code but not by below code in Java8, can you tell why?
I cracked up at work. You won the internet today.