#include <stdio.h>int main(){ int t,i,j,n,m,h,sum,a[4000]; scanf("%d",&t); while (t--) { scanf("%d",&n); for (i=1;i<=n;i++) a[i]=0; sum=0; scanf("%d",&m); for (i=1;i<=m;i++) {scanf("%d",&h); for (j=1;j*h<=n;j++) a[j*h]=1; } for ( Read More
posted @ 2012-10-17 20:46 godjob Views(172) Comments(0) Diggs(0) Edit