/in/foo.cc: In function 'int main()':
/in/foo.cc:7:17: warning: format '%ld' expects argument of type 'long int*', but argument 2 has type 'long long int*' [-Wformat=]
scanf("%ld", &q);
^
/in/foo.cc:12:25: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long unsigned int' [-Wformat=]
printf("%ld ", ans % 10);
^
/in/foo.cc:14:19: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=]
printf("%ld", sum);
^