Question: Help can anyone see the problem in my program?

Code
 

L:={NULL}:
for q from 11 to 100
check:=0:
for p from 1 to 200
n:=length(p):
for i from 1 to n
a[i]:=p[i]:
s:=sum(a[i],i=2..n)
if p-a[1]-10*s*modq=0 then
check:=check+1:
if check=200 then
L:=L{op(L),q}:
print(L);

and the pseudocode:
1. L is the empty set
2. for q from 11 to 100
3. check=0
4. for p from 1 to 200
5. find n, the number of digits of p
6. for i from 1 to n
7. find a[i], the ith digit of p
8. obtain s =sum(a[i],i=2..n)
9. if p - a[1] - 10s mod q =0 then
10. check=check+1
11. if check=200 then
12. add q to the set L
13. print L
 
Please Wait...