| 19650 | 2025-12-18 00:02:43 | Ancsa | Virágos rét (50 pont) | cpp17 | Forditási hiba |
#include <iostream>
using namespace std;
int main()
{
long long int n, k, uj, hanyret=0;
cin>>n>>k;
if (k>hanyret)
cout 0;
else
{
for(int i=0;i<n;i++)
{
cin>>uj;
hanyret+=uj;
}
cout << (hanyret-k+2)*(hanyret-k+1)/2 << endl;
}
return 0;
}
open /var/local/lib/isolate/415/box/a.out: no such file or directory
main.cpp: In function 'int main()':
main.cpp:10:13: error: expected ';' before numeric constant
10 | cout 0;
| ^~
| ;