#include using namespace std; typedef long long ll; ll s[50000000]; main(){ ll P; scanf("%lld",&P); for(int i=1;i<=P;++i){ s[i]=s[i-1]+P%i; } int Q; scanf("%d",&Q); for(int i=0;i