Problem add1
User nzx
Submission Time 2025-11-20 11:34:54
Score 0
Max Time N/A
Max Memory N/A

Compile Error

add1.cpp: In function ‘int main()’:
add1.cpp:7:14: error: expected primary-expression before ‘%’ token
7 | ll n; scanf(%d, n);
| ^
add1.cpp:7:15: error: ‘d’ was not declared in this scope
7 | ll n; scanf(%d, n);
| ^
add1.cpp:8:10: error: invalid conversion from ‘long long int’ to ‘const char*’ [-fpermissive]
8 | printf(n+1);
| ~^~
| |
| long long int
In file included from /usr/include/stdio.h:867,
from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from add1.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:105:32: note: initializing argument 1 of ‘int printf(const char*, ...)’
105 | printf (const char *__restrict __fmt, ...)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~