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;
- }
}
Login please!
In order to post something you must login first. You can use the form in the top of this page.