Problem Description
Given a large number represent in the form of an integer array A, where each element is a digit.
You have to find whether there exists any permutation of the array A such that the number becomes divisible by 60.
Return 1 if it exists, 0 otherwise.
A = [0, 6]
Input 2:
A = [2, 3]
1
Output 2:
0
We can rearrange the digits to form 60, which is divisible by 60.
Explanation 2:
There are only two possible permutations: [23, 32].
Both of them are not divisible by 60.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.