| Problem | add1 |
|---|---|
| User | nzx |
| Submission Time | 2025-11-20 11:34:15 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
add1.cpp: In function ‘int main()’:
add1.cpp:7:14: error: invalid conversion from ‘long long int’ to ‘const char*’ [-fpermissive]
7 | ll n; scanf(n);
| ^
| |
| long long int
In file included 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/stdio.h:397:42: note: initializing argument 1 of ‘int scanf(const char*, ...)’
397 | extern int scanf (const char *__restrict __format, ...) __wur;
| ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
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/x