Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Human factor reducing time complecity ^o^
You can tell sscanf to ignore a segment by adding * to the format specifier.
sscanf(ip, "%*d.%d.%d.%d", lowies, lowies+1, lowies+2);
This saves an extra unsigned variable.
The real abomination is modern website and OS design and planned obsolescence enacted through willful anti-efficiency. But the 17th
ret*=59;
overflowsunsigned long long
anyway. I simply precomputed the final answers, and 24 was still overkill, and now I can see that the last third of even those few are simply wrong.This comment is hidden because it contains spoiler information about the solution
maybe add braces, at least in the 42 network this wouldn't be considered norme
I don't agree with you
How would you simplify it?
i think it's uneed complicated
that's just a geneal statement, not specific to the task ~~
Your task is to find out what this is and write a function that will add two strings together, there must be a space between the two strings.
Writing this abomination is more tedious that writing a proper solution.
This comment is hidden because it contains spoiler information about the solution
Yes, indeed
Runtime per se won't be a problem here (maybe it is about 0.4ms). The real trouble is, that this ends up in an infinite loop for values above the square closest to INT_MAX.
Nice !
But what about big numbers, according compute time (eg: 2147395600 or 2147483647)
Well, I feel dumb for not figuring out a fast enough algorithm for this.
Loading more items...