P16273 [GeeksforGeeks] Check if divisible by 52730
普及-
题目描述

Given a number N in the form of string, the task is to check if the number is divisible by 5.

Example 1:
Input:
N = "5"
Output:
1
Explanation:
5 is divisible by 5.

Example 2:
Input:
N = "1000001"
Output:
0
Explanation:
1000001 is not divisible
by 5.

Your Task:
You don't need to read input or print anything. Your task is to complete the function divisibleBy5() which takes the string N and returns 1 if N is divisible by 5, else returns 0.

Expected Time Complexity: O(|N|)
Expected Auxiliary Space: O(1)
Constraints:
1<= N <=10^{5}

输入格式

见题面

输出格式

见题面

样例输入
N = "5"
样例输出
1