code 1: int total = power(n, k, 1000000007);
for(int i=1;i<=n;i++) { if(visited[i]==1)continue; total -= power(hitung(i, tree , visited), k, 100000