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 tmp = 0 for k, v in dic2.items(): tmp += v * pow(M - k, K, MOD) tmp %= MOD all = pow(M, K, MOD) ans = all * (N + 1) ans -= tmp ans %= MOD ans *= pow(all, -1, MOD) ans %= MOD print(ans)