Problem sum
User JustKitkat
Submission Time 2024-12-02 10:36:09
Score 0
Max Time N/A
Max Memory N/A

Compile Error

sum.cpp: In function ‘long long int readInt()’:
sum.cpp:7:7: error: local external declaration ‘char getchar_unlocked()’ [-fpermissive]
7 | char getchar_unlocked();
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/stdio.h:864,
from /usr/include/c++/9/cstdio:42,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:46,
from sum.cpp:1:
/usr/include/x86_64-linux-gnu/bits/stdio.h:73:1: note: does not match previous declaration ‘int getchar_unlocked()’
73 | getchar_unlocked (void)
| ^~~~~~~~~~~~~~~~
sum.cpp:9:8: error: ‘ch’ was not declared in this scope
9 | while(ch<'0'||ch>'9'){if(ch=='-')s=0;ch=getchar_unlocked();}
| ^~
sum.cpp:10:8: error: ‘ch’ was not declared in this scope
10 | while(ch>='0'&&ch<='9'){x=(x<<3)+(x<<1)+ch-'0';ch=getchar_unlocked();}
| ^~
sum.cpp: In function ‘int main()’:
sum.c