Liste des Groupes | Revenir à cl c |
On 19/03/2025 01:38, DFS wrote:I wouldn't have known it was a famous math conjecture, but no doubt the author of the problem did.>This is related to the Collatz Conjecture. What's weird is not mentioning it.
I'm doing these algorithm problems at
https://cses.fi/problemset/list/
>
For instance: Weird Algorithm
https://cses.fi/problemset/task/1068
My initial submission used straight to console. It was rejected for untold reasons, so I tried a variety of changes, including collating.len = strlen(result);And what's odd here is collating the results in a string (especially when the possible number of steps is unknown). Why not just print it straight to the console?
sprintf(result + len, "%d ", n);
Les messages affichés proviennent d'usenet.