Problem sumint
User luminar13s
Submission Time 2026-05-18 12:01:49
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sumint.cpp:2:20: error: expected ‘;’ before ‘int’
2 | using namespace std
| ^
| ;
3 |
4 | int main() {
| ~~~
sumint.cpp: In function ‘int main()’:
sumint.cpp:6:2: error: expected initializer before ‘cin’
6 | cin >> x;
| ^~~
sumint.cpp:7:18: error: unable to find numeric literal operator ‘operator""a’
7 | long long sum = 0a
| ^~
sumint.cpp:8:18: error: ‘i’ was not declared in this scope
8 | for (int i = 0; i<=x; i++) {
| ^
sumint.cpp:8:21: error: ‘x’ was not declared in this scope
8 | for (int i = 0; i<=x; i++) {
| ^
sumint.cpp:13:13: error: expected ‘;’ before ‘return’
13 | cout << sum
| ^
| ;
14 | return 0;
| ~~~~~~