Problem Link - Find Remainder Practice Problem in 500 difficulty rating
Problem Statement:
Write a program to find the remainder when an integer A is divided by an integer B .
Approach:
- The problem is simple and can be solved using the modulus operator
%
in most programming languages. The modulus operator returns the remainder after division. - Print the result of
A % B
.
Complexity:
- Time Complexity:
O(1)
. Simple output is done - Space Complexity:
O(1)
. No extra space required.