foo.cc: In function 'int main()':
foo.cc:31:23: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d%d",&n,&k);
~~ ^
foo.cc:31:23: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
foo.cc:42:26: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d",&x);
~~^
foo.cc:44:36: warning: format '%d' expects argument of type 'int', but argument 2 has type 'long int' [-Wformat=]
printf("%d\n",getsum(x));
~~~~~~~~~^
foo.cc:48:31: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d%d",&x,&y);
~~ ^
foo.cc:48:31: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
foo.cc:54:31: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'long int*' [-Wformat=]
scanf("%d%d",&x,&y);
~~ ^
foo.cc:54:31: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'long int*' [-Wformat=]
foo.cc:31:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&n,&k);
~~~~~^~~~~~~~~~~~~~
foo.cc:38:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%c",&c);
~~~~~^~~~~~~~~
foo.cc:42:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",&x);
~~~~~^~~~~~~~~
foo.cc:48:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&x,&y);
~~~~~^~~~~~~~~~~~~~
foo.cc:54:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d",&x,&y);
~~~~~^~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务