import collections n,m,k = map(int,input().split()) a = list(map(int,input().split())) mod = 998244353 cnt = [0 for i in range(1000000+10)] for i in a: cnt[i] += 1 x = [0 for i in range(n+1)] b = set(a) for i in b: j = i while j <= n: x[j] += cnt[i] j += i ans = 0 inv = pow(m,mod-2,mod) for i in range(1,n+1): ans += (1 - pow((m-x[i])*inv%mod,k,mod)) % mod ans %= mod print(ans)