I solved problems A–D, but I was quite slow, also I had two incorrect submissions for problem A, so my rating delta was -21.
If you want to watch my screencast and editorial, it will appear (UPD: has appeared) behind this link in several minutes: https://youtu.be/NuyV1LIMX3E; or in this box:
And, of course, my warmest congratulations to tourist on reaching 4000 rating points milestone!
Thanks, I always do appreciate your editorials!
edit : he mentioned that the number is prime for a brief second
Yes, it works only for an odd modulus, but I of course was proving it for an odd divisor of $$$g$$$ (proving that it only can be $$$1$$$, thus $$$g$$$ is a power of two).