EditorialRead two integers AAA and BBB, then print A mod BA \bmod BAmodB. The time complexity is O(1)O(1)O(1).