#include #include #define For(i, a, b) for(int i = a; i < b; i++) #define rep(i, n) For(i, 0, n) #define rFor(i, a, b) for(int i = a; i >= b; i--) #define ALL(v) (v).begin(), (v).end() #define rALL(v) (v).rbegin(), (v).rend() using namespace std; using lint = long long; using ld = long double; using mint = atcoder::modint998244353; int INF = 2000000000; lint LINF = 1000000000000000000; int main() { int n, m, k; cin >> n >> m >> k; vector a(m), cnt(1000010); rep(i, m) { cin >> a[i]; cnt[a[i]]++; } vector d(n + 1, 0); rep(i, 1000010) { if (cnt[i] > 0) { for (int j = i; j <= n; j += i) { d[j] += cnt[i]; } } } mint ans = mint(0); For(i, 1, n + 1) { mint p = mint(mint(m - d[i]) / mint(m)).pow(k); p = mint(1) - p; ans += p; } cout << ans.val() << endl; }