pages:
  • 1
Ln (x) dx SAYS

sharp include iostream
using namespace std;
int a[500001] = {0};
int main()
{

  • int t, n;

  • for(int i = 1; i <= 250000; i++)

    • for(int j = 2; i * j <= 500000; j++)

      • a[i * j] += i;

  • cin >> t;

  • while(t--)

  • {

    • cin >> n;

    • cout << a[n] << endl;

  • }

}