#include #include #include using namespace std; map func(long n) { map res; for(long i=2; i*i<=n; ++i) { int cnt=0; while (n%i==0) { ++cnt; n/=i; } if (cnt) res[i]+=cnt; } if (n>1) res[n]++; return res; } long power(long x, int n) { long res=1; for(int i=0; i>n; auto f=func(n); long res1=0; long t=0; for(auto& e: f) { res1+=(e.first-1)*e.second; t+=power(e.first, e.second)-1; } cout<