题目描述
Given a number N. Check whether it is divisble by 4.
Example 1:
Input:
N = 1124
Output: 1
Explanation: The number is divisible by 4
as 1124 % 4 = 0.
ââ¬â¹Example 2:
Input:
N = 7
Output: 0
Explanation: The number is not divisibly by
4 as 7 % 4 = 3.
Your Task:
You don't need to read input or print anything. Your task is to complete the function divisibleBy4() which takes the number in the form of a string N as input and returns 1 if the number is divisible by 4. Else, it returns 0.
Expected Time Complexity: O(1).
Expected Auxiliary Space: O(1).
Constraints:
1 <= N <= 10^{1000}+5
输入格式
见题面
输出格式
见题面
样例输入
N = 1124
样例输出
1