#include using namespace std; #pragma GCC target ("avx2") #pragma GCC optimization ("O3") #pragma GCC optimization ("unroll-loops") int main(void){ int N,Q; cin >> N >> Q; vector dp(N+1); vector sum(N+1); dp[1] = sum[1] = 1; for( int i = 2; i <= N; i++ ) { dp[i] += dp[1]; for( int j = 2; j*j <= i; j++ ) { if( i%j == 0 && j*j != i ) { dp[i] += dp[j]+dp[i/j]; }else if( i%j == 0 ) { dp[i] += dp[j]; } } sum[i] = dp[i]+sum[i-1]; } for( int i = 0; i < Q; i++ ) { int x; cin >> x; printf("%ld\n",dp[x]*sum[N/x]); } }