Below are some of the formulas that can be useful while doing competitive programming.
Please comment if you find anything incorrect.
- 1∗1!+2∗2!+...+x∗x! = (x+1)!−1
- (A+B)%C = (A%C + B%C )%C.
- (A* B)%C = ((A%C) * (B%C))%C
- LCM(a, b) = (a * b) / GCD(a, b)
Please comment if you find anything incorrect.
No comments:
Post a Comment