Brute Force Implementation ( Time Complexity : O ( N ^ 3 ) ) PHP program to find count of subsequences of size three divisible by M .
< ? php function coutSubSeq ( $ A , $ N , $ M ) { $ sum = 0 ; $ ans = 0 ;