After a lot of die retry, I achieved to make an (almost) fully working C program from a funny mathematical problem. You can read the full conversation if you want to see the process (french-only, sorry about that)