/in/foo.cc: In function 'void primes(int)':
/in/foo.cc:18:19: warning: left operand of comma operator has no effect [-Wunused-value]
for(ll j=1;j<=num1,i*prime[j]<=n;++j){
~^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:36:15: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'll* {aka long long int*}' [-Wformat=]
scanf("%d",&n);primes(maxx);
~~^
/in/foo.cc:39:46: warning: format '%d' expects argument of type 'int', but argument 2 has type 'll {aka long long int}' [-Wformat=]
for(int i=1;i<=num2;++i)printf("%d\n",ans[i]);
~~~~~~^