Let read () be a function which returns the current value read from given 500 integers.
P[50] array of 50 elements ,where all elements is initialized to 0.
Program P()
{
For(i=1 to 500)
{
x = read();
if(x>50)
{
P[x%50]++; // here we can use P[x] ++ but for that we would require array of size 100
}
}
}
Therefore answer is A