foo.cc: In function 'int main()':
foo.cc:10:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&t);
~~~~~^~~~~~~~~~~
foo.cc:13:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&n);
~~~~~^~~~~~~~~~~
foo.cc:54:7: warning: 'k[1]' may be used uninitialized in this function [-Wmaybe-uninitialized]
k[1]+=1;
~~~~^~~
foo.cc:56:12: warning: 'k[0]' may be used uninitialized in this function [-Wmaybe-uninitialized]
while(k[p]>=10) k[p]=0,k[--p]+=1;
~~~^