Wrong Answer
/in/foo.cc: In function 'int main()': /in/foo.cc:53:20: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=] printf("%ld\n",ans); ^
/in/foo.cc: In function 'int main()': /in/foo.cc:53:20: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'long long int' [-Wformat=] printf("%ld\n",ans); ^