Fading Coder

One Final Commit for the Last Sprint

Computational Solutions for AtCoder Beginner Contest 006

Divisibility and Digit Extraction The objective is to determine if a given integer $N$ is either divisible by 3 or contains the digit '3'. A direct approach involves checking the modulo and then iteratively extracting digits. The time complexity for this is $O(\log_{10} N)$. bool is_lucky(long long...

Understanding Fast Exponentiation and Matrix Fast Exponentiation

What Is Fast Exponentiation, and Why Use It? Fast exponentiation, as the name suggests, computes the nth power of a value in drastically reduced time. While it may not see frequent use in early learning stages, the core logic behind its a fundamental concept worth mastering for any algorithm develop...