money.cpp:6:6: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
main(){
^
money.cpp: In function 'int main()':
money.cpp:8:20: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
scanf("%lld",&n);
~~^
money.cpp:9:39: warning: format '%lld' expects argument of type 'long long int*', but argument 2 has type 'int*' [-Wformat=]
for(i=0;i<n;i++)scanf("%lld",&a[i]);
~~~~~^
money.cpp:18:22: warning: format '%lld' expects argument of type 'long long int', but argument 2 has type 'int' [-Wformat=]
printf("%lld",ans);
^
money.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld",&n);
~~~~~^~~~~~~~~~~
money.cpp:9:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
for(i=0;i<n;i++)scanf("%lld",&a[i]);
~~~~~^~~~~~~~~~~~~~