from collections import defaultdict MOD = 998244353 N, M, K = map(int, input().split()) A = list(map(int, input().split())) dic0 = defaultdict(int) for a in A: dic0[a] += 1 dic1 = defaultdict(int) for k, v in dic0.items(): for i in range(1, N // k + 1): dic1[i * k] += v dic2 = defaultdict(int) for v in dic1.values(): dic2[v] += 1 ans = 0 all = pow(M, K, MOD) for k, v in dic2.items(): ans += v * (all - pow(M - k, K, MOD)) ans %= MOD ans *= pow(all, -1, MOD) ans %= MOD print(ans)