submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s637134893
p00466
C
#include <stdio.h> int main(){ int sum,n,i,a,k,; sum=0; while(1){ scanf("%d",&a); if(a==0){ return 0; } for(i=0;i<9;i++){ scanf("%d",&n); sum+=n; } k=a-sum; printf("%d\n",k); } }
main.c: In function 'main': main.c:3:19: error: expected identifier or '(' before ';' token 3 | int sum,n,i,a,k,; | ^
s510160738
p00466
C
for(i=0;i<9;i++){ scanf("%d",&n); sum+=n; } k=a-sum; scanf("%d",&a); printf("%d\n",k); }
main.c:1:3: error: expected identifier or '(' before 'for' 1 | for(i=0;i<9;i++){ | ^~~ main.c:1:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<' token 1 | for(i=0;i<9;i++){ | ^ main.c:1:16: error: expected '=', ',', ';', 'asm' or '__attribute__' before '++' token 1 | for(i=0;i<9;i++){ | ^~ main.c:6:3: warning: data definition has no type or storage class 6 | k=a-sum; | ^ main.c:6:3: error: type defaults to 'int' in declaration of 'k' [-Wimplicit-int] main.c:6:5: error: 'a' undeclared here (not in a function) 6 | k=a-sum; | ^ main.c:6:7: error: 'sum' undeclared here (not in a function) 6 | k=a-sum; | ^~~ main.c:7:9: error: expected declaration specifiers or '...' before string constant 7 | scanf("%d",&a); | ^~~~ main.c:7:14: error: expected declaration specifiers or '...' before '&' token 7 | scanf("%d",&a); | ^ main.c:8:10: error: expected declaration specifiers or '...' before string constant 8 | printf("%d\n",k); | ^~~~~~ main.c:8:17: error: expected declaration specifiers or '...' before 'k' 8 | printf("%d\n",k); | ^ main.c:9:3: error: expected identifier or '(' before '}' token 9 | } | ^
s090670498
p00466
C
#include <stdio.h> int main(void) { int sum, x; int i; scanf("%d", &sum); for (i = 1; i < 10; i++) { scanf("%d", &x); sum -= x; } printf("%d\n", sum); return 0;
main.c: In function 'main': main.c:15:9: error: expected declaration or statement at end of input 15 | return 0; | ^~~~~~
s478076309
p00466
C
#include <stdio.h> int main(){ int a,b,c,d; scanf("%d",&a); for(i=0;i<9;i++){ scanf("%d",b); c+=b; } d=a-c; printf("%d\n",d); return 0; }
main.c: In function 'main': main.c:6:13: error: 'i' undeclared (first use in this function) 6 | for(i=0;i<9;i++){ | ^ main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in
s037871940
p00466
C
#include <stdio.h> int main(){ int a,b,c=0,d,i; while(1){ c=0 scanf("%d",&a); if(a==0){ return 0; } for(i=0;i<9;i++){ scanf("%d",&b); c+=b; } d=a-c; printf("%d\n",d); } }
main.c: In function 'main': main.c:6:20: error: expected ';' before 'scanf' 6 | c=0 | ^ | ; 7 | scanf("%d",&a); | ~~~~~
s940773023
p00466
C
N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}}
main.c:1:1: warning: data definition has no type or storage class 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^ main.c:1:1: error: type defaults to 'int' in declaration of 'N' [-Wimplicit-int] main.c:1:3: error: type defaults to 'int' in declaration of 'P' [-Wimplicit-int] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^ main.c:1:5: error: type defaults to 'int' in declaration of 'I' [-Wimplicit-int] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^ main.c:1:7: error: return type defaults to 'int' [-Wimplicit-int] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~ main.c: In function 'main': main.c:1:20: error: 'true' undeclared (first use in this function) 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~ main.c:1:1: note: 'true' is defined in header '<stdbool.h>'; this is probably fixable by adding '#include <stdbool.h>' +++ |+#include <stdbool.h> 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} main.c:1:20: note: each undeclared identifier is reported only once for each function it appears in 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~ main.c:1:26: error: implicit declaration of function 'scanf' [-Wimplicit-function-declaration] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~~ main.c:1:1: note: include '<stdio.h>' or provide a declaration of 'scanf' +++ |+#include <stdio.h> 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} main.c:1:26: warning: incompatible implicit declaration of built-in function 'scanf' [-Wbuiltin-declaration-mismatch] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~~ main.c:1:26: note: include '<stdio.h>' or provide a declaration of 'scanf' main.c:1:95: error: implicit declaration of function 'printf' [-Wimplicit-function-declaration] 1 | N,P,I;main(){while(true){scanf("%d",&N);if(N==0){break;}for(I=0;I<9;I++){scanf("%d",&P);N-=P;}printf("%d\n",N);}} | ^~~~~~ main.c:1:95: note: include '<stdio.h>' or provide a declaration of 'printf' main.c:1:95: warning: incompatible implicit declaration of built-in function 'printf' [-Wbuiltin-declaration-mismatch] main.c:1:95: note: include '<stdio.h>' or provide a declaration of 'printf'
s868323139
p00466
C
#include <stdio.h> int main(void) { int total; int sum = {0}; int n; int book; scanf("%d", &total); for (n = 1; n <= 9; n++){ scanf("%d", &book); sum += book; } printf ("%d\n", total - sum); return (0); } #include <stdio.h> int main(void) { int total; int sum = {0}; int n; int book; scanf("%d", &total); for (n = 1; n <= 9; n++){ scanf("%d", &book); sum += book; } printf ("%d\n", total - sum); return (0); }
main.c:26:5: error: redefinition of 'main' 26 | int main(void) | ^~~~ main.c:3:5: note: previous definition of 'main' with type 'int(void)' 3 | int main(void) | ^~~~
s411923681
p00466
C
#include <stdio.h> int main(void) { int b[10]={0}; int i; for(i=0;i<10;i++){ scanf("%d",&b[i]); if(b[i]==0) break; } for(i=1;i<10;i++) b[0]-=v[i]; printf("%d\n",b[0]); return 0;} }
main.c: In function 'main': main.c:13:23: error: 'v' undeclared (first use in this function) 13 | b[0]-=v[i]; | ^ main.c:13:23: note: each undeclared identifier is reported only once for each function it appears in main.c: At top level: main.c:18:1: error: expected identifier or '(' before '}' token 18 | } | ^
s234918359
p00466
C
#include<stdio.h> int main(void){ int i; int a,b=0,c; while(){ scanf("%d",&a); if(a==0)return 0; for(i=0;i<10;i++){ scanf("%d",&c); b+=c; } printf("%d\n",a-b); } return 0; }
main.c: In function 'main': main.c:5:15: error: expected expression before ')' token 5 | while(){ | ^
s235957477
p00466
C
#include <iostream> #define Iset int i,j,l; using namespace std; int main() { int a, b[11], c=0; Iset; cin >> a; for (i = 0; i < 9; i++) { cin >> b[i]; c += b[i]; } cout << a-c << endl; return 0; }
main.c:1:10: fatal error: iostream: No such file or directory 1 | #include <iostream> | ^~~~~~~~~~ compilation terminated.
s700000186
p00466
C
#include<stdio.h> int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;}
main.c: In function 'main': main.c:2:55: error: break statement not within loop or switch 2 | int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;} | ^~~~~ main.c: At top level: main.c:2:123: error: expected identifier or '(' before 'return' 2 | int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;} | ^~~~~~ main.c:2:132: error: expected identifier or '(' before '}' token 2 | int main(){int t,i,book;for(;;)scanf("%d,&t");if(t==0)break;for(i=0;i<9;i++){scanf("%d",&book);t-=book;}printf("%d\n",t);}return 0;} | ^
s818477961
p00466
C
#include <cstdio> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(flg == 0){ scanf("%d", &hiku); if(hiku == 0) flg = 1; sum -= hiku; } printf("%d", sum); return 0; }
main.c:1:10: fatal error: cstdio: No such file or directory 1 | #include <cstdio> | ^~~~~~~~ compilation terminated.
s823987903
p00466
C
#include <stdio.h> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(int i = 0; i < 9; i++){ scanf("%d", &hiku); if(hiku == 0) flg = 1; sum -= hiku; } printf("%d", sum); return 0; }
main.c: In function 'main': main.c:6:15: error: expected expression before 'int' 6 | while(int i = 0; i < 9; i++){ | ^~~
s991076587
p00466
C
#include<stdio.h> int main(){ int a, b, c, d, e, f, g, h, i, sum; int sum <= 10000; scanf("%d", &sum); if(sum > 10000) break; scanf("%d\n %d\n %d\n %d\n %d\n %d\n %d\n %d\n %d\n", a, b, c, d, e, f, g, h, i); printf("%d\n", sum-a-b-c-d-e-f-g-h-i); return 0; }
main.c: In function 'main': main.c:5:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '<=' token 5 | int sum <= 10000; | ^~ main.c:5:11: error: expected expression before '<=' token main.c:8:5: error: break statement not within loop or switch 8 | break; | ^~~~~
s533231591
p00466
C
#include <stdio.h> int main(){ int=a,b; scanf("%d",&b); while(b<=10000){ scanf("%d",&a); b=b-a; if(b==0) break; } printf("%d",b); return 0; }
main.c: In function 'main': main.c:3:4: error: expected identifier or '(' before '=' token 3 | int=a,b; | ^ main.c:4:13: error: 'b' undeclared (first use in this function) 4 | scanf("%d",&b); | ^ main.c:4:13: note: each undeclared identifier is reported only once for each function it appears in main.c:6:13: error: 'a' undeclared (first use in this function) 6 | scanf("%d",&a); | ^
s385183258
p00466
C
#include<stdio.h> int main(void) { int x,y; int a,b,c,d,e,f,g,h,i,; scanf("%d",&x); scanf("%d",&a); scanf("%d",&b); scanf("%d",&c); scanf("%d",&d); scanf("%d",&e); scanf("%d",&f); scanf("%d",&g); scanf("%d",&h); scanf("%d",&i); y=x-a-b-c-d-e-f-g-h-i; printf("%d\n",y); return 0; }
main.c: In function 'main': main.c:5:25: error: expected identifier or '(' before ';' token 5 | int a,b,c,d,e,f,g,h,i,; | ^
s856763580
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum); for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i] } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:8:25: error: expected ';' before '}' token 8 | sum -= book[i] | ^ | ; 9 | } | ~
s933094357
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d\n",&sum) for(i=0;i<9;i++){ scanf("%d\n",&book[i]); sum -= book[i]; } } printf("%d\n",sum); return 0; }
main.c: In function 'main': main.c:5:24: error: expected ';' before 'for' 5 | scanf("%d\n",&sum) | ^ | ; 6 | for(i=0;i<9;i++){ | ~~~ main.c: At top level: main.c:11:22: error: expected declaration specifiers or '...' before string constant 11 | printf("%d\n",sum); | ^~~~~~ main.c:11:29: error: unknown type name 'sum' 11 | printf("%d\n",sum); | ^~~ main.c:12:1: error: expected identifier or '(' before 'return' 12 | return 0; | ^~~~~~ main.c:13:1: error: expected identifier or '(' before '}' token 13 | } | ^
s236526909
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d\",&sum) for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum=0; return 0; }
main.c: In function 'main': main.c:5:12: warning: missing terminating " character 5 | scanf("%d\",&sum) | ^ main.c:5:12: error: missing terminating " character 5 | scanf("%d\",&sum) | ^~~~~~~~~~~ main.c:6:8: error: expected expression before 'for' 6 | for(i=0;i<9;i++){ | ^~~ main.c:12:10: error: expected ';' before '}' token 12 | return 0; | ^ | ; 13 | } | ~
s058386446
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum) for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum=0; return 0; }
main.c: In function 'main': main.c:5:22: error: expected ';' before 'for' 5 | scanf("%d",&sum) | ^ | ; 6 | for(i=0;i<9;i++){ | ~~~
s748699649
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0) break; for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; return 0; }
main.c: In function 'main': main.c:10:1: error: break statement not within loop or switch 10 | break; | ^~~~~
s495744968
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0){ break; } for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; return 0; }
main.c: In function 'main': main.c:10:7: error: break statement not within loop or switch 10 | break; | ^~~~~
s753079497
p00466
C
#include <stdio.h> int main(void){ int sum,i; int book[9]; for(i=0;i<9;i++){ book[i] = 0; } scanf("%d",&sum); if(sum == 0){ break; }else{ for(i=0;i<9;i++){ scanf("%d",&book[i]); sum -= book[i]; } printf("%d\n",sum); sum = 0; } return 0; }
main.c: In function 'main': main.c:10:7: error: break statement not within loop or switch 10 | break; | ^~~~~
s287464069
p00466
C++
#include <iostream> using namespace std; /** Problem0543 : Receipt **/ int main() { int sum, tmp=0; cin>>sum; rep(i, 9) { int t; cin>>t; tmp += t; } cout << sum-tmp << endl; }
a.cc: In function 'int main()': a.cc:9:13: error: 'i' was not declared in this scope 9 | rep(i, 9) { | ^ a.cc:9:9: error: 'rep' was not declared in this scope 9 | rep(i, 9) { | ^~~
s782756343
p00466
C++
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<iostream> #include<cstdio> #include<algorithm> #include<string> using namespace std; int main() { while(1){ int sum = 0; int n; cin >> sum; if(sum == 0) break; for(int i = 0; i < 9; i++){ cin >> n; sum -= n; } cout << sum << endl; } return 0; }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 2 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:21: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NODI
s046593694
p00466
C++
#include<iostream> using namespace std; int main(){ int a,b;sum=0; while(cin>>sum){ for(int i=0;i<9;i++){ cin>>b; sum-=b; } cout<<sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:17: error: 'sum' was not declared in this scope 4 | int a,b;sum=0; | ^~~
s276458920
p00466
C++
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; while(cin >>a){ if(a==0){break;} cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>i; cin >>j; cout << a-b-c-d-e-f-g-h-i-j<<endl; } } Compile Error Logs: ステータス Judge: 1/1 C++ CPU: 00.00 sec Memory: 1160 KB Length: 293 B 2012-11-04 20:23 2012-11-04 20:23 テストケースの判定結果 Case # Verdict CPU Time Memory In Out Case Name Case #1: : Accepted - - 213 B 23 B test_case_1 < prev | 1 / 1 | next > : Accepted - - Judge Input #1 ( in1.txt | 213 B) Judge Output #1 ( out1.txt | 23 B) 9850 200 300 450 2600 2500 1000 500 520 980 8790 200 1500 800 750 600 1400 680 1280 380 8089 560 1236
a.cc:68:6: error: stray '#' in program 68 | Case # Verdict CPU Time Memory In Out Case Name | ^ a.cc:69:7: error: stray '#' in program 69 | Case #1: : Accepted - - 213 B 23 B test_case_1 | ^ a.cc:77:13: error: stray '#' in program 77 | Judge Input #1 ( in1.txt | 213 B) Judge Output #1 ( out1.txt | 23 B) | ^ a.cc:77:49: error: stray '#' in program 77 | Judge Input #1 ( in1.txt | 213 B) Judge Output #1 ( out1.txt | 23 B) | ^ a.cc:2:1: error: expected unqualified-id before numeric constant 2 | 3 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:29: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~
s171346883
p00466
C++
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 #include <iostream> #include <string> using namespace std; int main(){ int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; while(cin >>a){ if(a==0){break;} cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>i; cin >>j; cout << a-b-c-d-e-f-g-h-i-j<<endl; } }
a.cc:3:1: error: expected unqualified-id before numeric constant 3 | 2 | ^ In file included from /usr/include/c++/14/iosfwd:42, from /usr/include/c++/14/ios:40, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:31: /usr/include/c++/14/bits/postypes.h:68:11: error: 'ptrdiff_t' does not name a type 68 | typedef ptrdiff_t streamsize; // Signed integral type | ^~~~~~~~~ /usr/include/c++/14/bits/postypes.h:41:1: note: 'ptrdiff_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 40 | #include <cwchar> // For mbstate_t +++ |+#include <cstddef> 41 | In file included from /usr/include/c++/14/bits/exception_ptr.h:38, from /usr/include/c++/14/exception:166, from /usr/include/c++/14/ios:41: /usr/include/c++/14/new:131:26: error: declaration of 'operator new' as non-function 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:131:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 131 | _GLIBCXX_NODISCARD void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ In file included from /usr/include/wchar.h:35, from /usr/include/c++/14/cwchar:44, from /usr/include/c++/14/bits/postypes.h:40: /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:132:41: error: attributes after parenthesized initializer ignored [-fpermissive] 132 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:133:26: error: declaration of 'operator new []' as non-function 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~~~ /usr/include/c++/14/new:133:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 133 | _GLIBCXX_NODISCARD void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:134:41: error: attributes after parenthesized initializer ignored [-fpermissive] 134 | __attribute__((__externally_visible__)); | ^ /usr/include/c++/14/new:140:29: error: 'std::size_t' has not been declared 140 | void operator delete(void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:142:31: error: 'std::size_t' has not been declared 142 | void operator delete[](void*, std::size_t) _GLIBCXX_USE_NOEXCEPT | ^~~ /usr/include/c++/14/new:145:26: error: declaration of 'operator new' as non-function 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:145:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:145:52: error: expected primary-expression before 'const' 145 | _GLIBCXX_NODISCARD void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:147:26: error: declaration of 'operator new []' as non-function 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:147:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:147:54: error: expected primary-expression before 'const' 147 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT | ^~~~~ /usr/include/c++/14/new:154:26: error: declaration of 'operator new' as non-function 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:154:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:154:68: error: expected primary-expression before ')' token 154 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:155:73: error: attributes after parenthesized initializer ignored [-fpermissive] 155 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:156:26: error: declaration of 'operator new' as non-function 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:156:44: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:156:68: error: expected primary-expression before ',' token 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:156:70: error: expected primary-expression before 'const' 156 | _GLIBCXX_NODISCARD void* operator new(std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:162:26: error: declaration of 'operator new []' as non-function 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~~~ /usr/include/c++/14/new:162:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:162:70: error: expected primary-expression before ')' token 162 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t) | ^ /usr/include/c++/14/new:163:73: error: attributes after parenthesized initializer ignored [-fpermissive] 163 | __attribute__((__externally_visible__, __alloc_size__ (1), __malloc__)); | ^ /usr/include/c++/14/new:164:26: error: declaration of 'operator new []' as non-function 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~~~ /usr/include/c++/14/new:164:46: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~~ /usr/lib/gcc/x86_64-linux-gnu/14/include/stddef.h:214:23: note: 'size_t' declared here 214 | typedef __SIZE_TYPE__ size_t; | ^~~~~~ /usr/include/c++/14/new:164:70: error: expected primary-expression before ',' token 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^ /usr/include/c++/14/new:164:72: error: expected primary-expression before 'const' 164 | _GLIBCXX_NODISCARD void* operator new[](std::size_t, std::align_val_t, const std::nothrow_t&) | ^~~~~ /usr/include/c++/14/new:171:29: error: 'std::size_t' has not been declared 171 | void operator delete(void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:173:31: error: 'std::size_t' has not been declared 173 | void operator delete[](void*, std::size_t, std::align_val_t) | ^~~ /usr/include/c++/14/new:179:33: error: declaration of 'operator new' as non-function 179 | _GLIBCXX_NODISCARD inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT | ^~~~~~~~ /usr/include/c++/14/new:179:51: error: 'size_t' is not a member of 'std'; did you mean 'size_t'? 179 | _GLIBCXX_NODI
s834281560
p00466
C++
#include<iostream> using namespace std; int main () { int main n,m,i; cin >> n; for (i=0;i<9;i++) { cin >> m; n-=m; } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:14: error: expected initializer before 'n' 5 | int main n,m,i; | ^ a.cc:6:12: error: 'n' was not declared in this scope 6 | cin >> n; | ^ a.cc:7:10: error: 'i' was not declared in this scope 7 | for (i=0;i<9;i++) { | ^ a.cc:8:16: error: 'm' was not declared in this scope; did you mean 'tm'? 8 | cin >> m; | ^ | tm
s691217141
p00466
C++
#include<iostream> using namespace std; int main () { int main n,m,i; cin >> n; for (i=0;i<9;i++) { cin >> m; n-=m; } cout << n << endl; }
a.cc: In function 'int main()': a.cc:5:14: error: expected initializer before 'n' 5 | int main n,m,i; | ^ a.cc:6:12: error: 'n' was not declared in this scope 6 | cin >> n; | ^ a.cc:7:10: error: 'i' was not declared in this scope 7 | for (i=0;i<9;i++) { | ^ a.cc:8:16: error: 'm' was not declared in this scope; did you mean 'tm'? 8 | cin >> m; | ^ | tm
s071690491
p00466
C++
#include<iostream> using namespace std; int main(){ int n; while(cin>>n &n){ for(int i=0;i<9;i++){ int x; cin>>x; n-=x; } cout<<n<<endl; } }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | while(cin>>n &n){ | ~~~~~~ ^~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:7:22: note: candidate: 'operator&(int, int)' (built-in) 7 | while(cin>>n &n){ | ~~~~~~~^~ a.cc:7:22: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)' 141 | operator&(byte __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::byte' 141 | operator&(byte __l, byte __r) noexcept | ~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)' 84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Fmtflags' 84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)' 134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Openmode' 134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)' 181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Iostate' 181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~^~~
s782642398
p00466
C++
#include<iostream> using namespace std; int main(){ int n; while(cin>>n &n){ for(int i=0;i<9;i++){ int x; cin>>x; n-=x; } cout<<n<<endl; } }
a.cc: In function 'int main()': a.cc:7:22: error: no match for 'operator&' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 7 | while(cin>>n &n){ | ~~~~~~ ^~ | | | | | int | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:7:22: note: candidate: 'operator&(int, int)' (built-in) 7 | while(cin>>n &n){ | ~~~~~~~^~ a.cc:7:22: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/cstddef:141:3: note: candidate: 'constexpr std::byte std::operator&(byte, byte)' 141 | operator&(byte __l, byte __r) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:141:18: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::byte' 141 | operator&(byte __l, byte __r) noexcept | ~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:84:3: note: candidate: 'constexpr std::_Ios_Fmtflags std::operator&(_Ios_Fmtflags, _Ios_Fmtflags)' 84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:84:27: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Fmtflags' 84 | operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:134:3: note: candidate: 'constexpr std::_Ios_Openmode std::operator&(_Ios_Openmode, _Ios_Openmode)' 134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:134:27: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Openmode' 134 | operator&(_Ios_Openmode __a, _Ios_Openmode __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~~^~~ /usr/include/c++/14/bits/ios_base.h:181:3: note: candidate: 'constexpr std::_Ios_Iostate std::operator&(_Ios_Iostate, _Ios_Iostate)' 181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ^~~~~~~~ /usr/include/c++/14/bits/ios_base.h:181:26: note: no known conversion for argument 1 from 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} to 'std::_Ios_Iostate' 181 | operator&(_Ios_Iostate __a, _Ios_Iostate __b) _GLIBCXX_NOTHROW | ~~~~~~~~~~~~~^~~
s964119065
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9; i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s129675902
p00466
C++
#include<stdio.h> int main(void) { int sougaku=0, money=0, nazo=0; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9; i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s635596193
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; scanf_s("%d", &money); while (money != 0){ nazo = nazo - money; scanf_s("%d", &money); } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s594377301
p00466
C++
#include<stdio.h> int main() { int sougaku, money, nazo; scanf("%d", &sougaku); nazo = sougaku; scanf_s("%d", &money); while (money != 0){ nazo = nazo - money; scanf("%d", &money); } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:7:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 7 | scanf_s("%d", &money); | ^~~~~~~ | scanf
s906911394
p00466
C++
#include<stdio.h> int main(void) { int sougaku, money, nazo; scanf_s("%d", &sougaku); nazo = sougaku; for (int i = 0; i < 9;i++){ scanf_s("%d", &money); nazo = nazo - money; } printf("%d\n", nazo); return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 5 | scanf_s("%d", &sougaku); | ^~~~~~~ | scanf
s465141478
p00466
C++
include<stdio.h> int main(){ int total; int a[9]; int i; scanf("%d",&total); for(i=0;i<9;i++){ scanf("%d",&a[i]); } for(i=0;i<9;i++){ total -= a[i]; } printf("%d\n",total); return(0); }
a.cc:1:1: error: 'include' does not name a type 1 | include<stdio.h> | ^~~~~~~
s729915023
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m;A for(int n=1; n<10; n++ ){ cin>>k; m-=k; cout<<m<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: 'A' was not declared in this scope 7 | cin>>m;A | ^ a.cc:8:22: error: 'n' was not declared in this scope 8 | for(int n=1; n<10; n++ ){ | ^
s660651077
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int m,k; cin>>m; for(int n=0; n<9; n++ ){ cin>>k; m-=k; if(k=0){ break; } } cout<<m<<endl; return 0;A }
a.cc: In function 'int main()': a.cc:16:18: error: 'A' was not declared in this scope 16 | return 0;A | ^
s132002325
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; while(true){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:20: error: 'i' was not declared in this scope 9 | if(i==0){ | ^
s947350659
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; while(){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:15: error: expected primary-expression before ')' token 8 | while(){ | ^ a.cc:9:20: error: 'i' was not declared in this scope 9 | if(i==0){ | ^
s257572608
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; for(){ if(i==0){ cin>>total; }else{ cin>>books; if(books==0){ break; } total-=books; } } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:13: error: expected primary-expression before ')' token 8 | for(){ | ^ a.cc:20:9: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:27: error: expected ')' before 'return' 19 | cout<<total<<'\n'; | ^ | ) 20 | return 0; | ~~~~~~ a.cc:8:12: note: to match this '(' 8 | for(){ | ^
s054788991
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; int lostbook=0; cin>>total; for(){ cin>>books; if(books==0){ break; } total-=books; } cout<<total<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:13: error: expected primary-expression before ')' token 9 | for(){ | ^ a.cc:19:9: error: expected primary-expression before 'return' 19 | return 0; | ^~~~~~ a.cc:18:27: error: expected ')' before 'return' 18 | cout<<total<<'\n'; | ^ | ) 19 | return 0; | ~~~~~~ a.cc:9:12: note: to match this '(' 9 | for(){ | ^
s278072712
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total }else{ cin>>books; total-=books; } } cout<<total; return 0; }
a.cc: In function 'int main()': a.cc:10:30: error: expected ';' before '}' token 10 | cin>>total | ^ | ; 11 | }else{ | ~
s057220361
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total; if(total>10000){ break; } }else{ cin>>books; total-=books; } } cout>>total>>'\n'; return 0; }
a.cc: In function 'int main()': a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:19:13: note: candidate: 'operator>>(int, int)' (built-in) 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ a.cc:19:13: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:19:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 19 | cout>>total>>'\n'; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]': a.cc:19:8: required from here 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~
s341807507
p00466
C++
#include<iostream> using namespace std; int main(){ int total; int books; for(int i=0;i<10;i++){ if(i==0){ cin>>total; if(total>10000){ break; } }else{ cin>>books; total-=books; } } cout>>total>>'\n'; return 0; }
a.cc: In function 'int main()': a.cc:19:13: error: no match for 'operator>>' (operand types are 'std::ostream' {aka 'std::basic_ostream<char>'} and 'int') 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ | | | | | int | std::ostream {aka std::basic_ostream<char>} a.cc:19:13: note: candidate: 'operator>>(int, int)' (built-in) 19 | cout>>total>>'\n'; | ~~~~^~~~~~~ a.cc:19:13: note: no known conversion for argument 1 from 'std::ostream' {aka 'std::basic_ostream<char>'} to 'int' In file included from /usr/include/c++/14/string:55, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/bits/basic_string.tcc:835:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 835 | operator>>(basic_istream<_CharT, _Traits>& __in, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.tcc:835:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:131:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator>>(byte, _IntegerType)' 131 | operator>>(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:131:5: note: template argument deduction/substitution failed: a.cc:19:9: note: cannot convert 'std::cout' (type 'std::ostream' {aka 'std::basic_ostream<char>'}) to type 'std::byte' 19 | cout>>total>>'\n'; | ^~~~ In file included from /usr/include/c++/14/istream:1109, from /usr/include/c++/14/iostream:42: /usr/include/c++/14/bits/istream.tcc:978:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT&)' 978 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c) | ^~~~~~~~ /usr/include/c++/14/bits/istream.tcc:978:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:849:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char&)' 849 | operator>>(basic_istream<char, _Traits>& __in, unsigned char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:849:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:854:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char&)' 854 | operator>>(basic_istream<char, _Traits>& __in, signed char& __c) | ^~~~~~~~ /usr/include/c++/14/istream:854:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:896:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_istream<_CharT, _Traits>& std::operator>>(basic_istream<_CharT, _Traits>&, _CharT*)' 896 | operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/istream:896:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<_CharT, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:939:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, unsigned char*)' 939 | operator>>(basic_istream<char, _Traits>& __in, unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:939:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:945:5: note: candidate: 'template<class _Traits> std::basic_istream<char, _Traits>& std::operator>>(basic_istream<char, _Traits>&, signed char*)' 945 | operator>>(basic_istream<char, _Traits>& __in, signed char* __s) | ^~~~~~~~ /usr/include/c++/14/istream:945:5: note: template argument deduction/substitution failed: a.cc:19:15: note: 'std::ostream' {aka 'std::basic_ostream<char>'} is not derived from 'std::basic_istream<char, _Traits>' 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:1099:5: note: candidate: 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&)' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~ /usr/include/c++/14/istream:1099:5: note: template argument deduction/substitution failed: /usr/include/c++/14/istream: In substitution of 'template<class _Istream, class _Tp> _Istream&& std::operator>>(_Istream&&, _Tp&&) [with _Istream = std::basic_ostream<char>&; _Tp = int&]': a.cc:19:8: required from here 19 | cout>>total>>'\n'; | ^~~~~ /usr/include/c++/14/istream:1099:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 1099 | operator>>(_Istream&& __is, _Tp&& __x) | ^~~~~~~~
s423567380
p00466
C++
#include<iostream> using namespace std; int main() { int a; int b; int c; int d; int e; int f; int g; int h; int i; int j; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; cout << 0*a cout << a-(b+c+d+e+f+g+h+i+j) << '\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:16: error: expected ';' before 'cout' 8 | cout << 0*a | ^ | ; 9 | cout << a-(b+c+d+e+f+g+h+i+j) << '\n'; | ~~~~
s585074060
p00466
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f,g,h,i,j,h; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; h=a-b-c-d-e-f-g-h-i-j cout<<h<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:6:27: error: redeclaration of 'int h' 6 | int a,b,c,d,e,f,g,h,i,j,h; | ^ a.cc:6:21: note: 'int h' previously declared here 6 | int a,b,c,d,e,f,g,h,i,j,h; | ^ a.cc:9:24: error: expected ';' before 'cout' 9 | h=a-b-c-d-e-f-g-h-i-j | ^ | ; 10 | cout<<h<<'\n'; | ~~~~
s968924581
p00466
C++
#include<iostream> using namespace std; int main() { int a,b,c,d,e,f,g,h,i,j,k; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; k=a-b-c-d-e-f-g-h-i-j cout<<k<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:9:24: error: expected ';' before 'cout' 9 | k=a-b-c-d-e-f-g-h-i-j | ^ | ; 10 | cout<<k<<'\n'; | ~~~~
s311606496
p00466
C++
#include<iostream> using namespace std; int main(){ int goke; int hon; int count=0; while(true){ if(count==0){ cin>>goke; if(goke==0){ break }; count++; } else{ cin>>hon; goke-=hon; count++; } if(count==10){ cout<<goke<<'\n'; count=0; } } return0; }
a.cc: In function 'int main()': a.cc:13:22: error: expected ';' before '}' token 13 | break }; | ^~ | ; a.cc:25:9: error: 'return0' was not declared in this scope 25 | return0; | ^~~~~~~
s692776874
p00466
C++
#include<iostream> using namespace std; int main(){ int goke; int hon; int count=0; while(true){ if(count==0){ cin>>goke; if(goke==0){ break; } count++; } else{ cin>>hon; goke-=hon; count++; } if(count==10){ cout<<goke<<'\n'; count=0; } } return0; }
a.cc: In function 'int main()': a.cc:25:9: error: 'return0' was not declared in this scope 25 | return0; | ^~~~~~~
s521868923
p00466
C++
#include <iostream> using namespace std; int main() { while(1){ int n,a,sum=0; cin>>n; if(n==0) break; for(int i=1; i<=9; i++){ cin>>a; sum+=a; cout<<n-sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:2: error: expected '}' at end of input 17 | } | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s528014043
p00466
C++
include<iostream> #include<algorithm> #include<functional> #include<cstdio> #include<vector> #include<map> #include<string> #include<cmath> using namespace std; int main(){ int s; int n; while(cin>>s,s!=0){ for(int i=0;i<9;i++){ cin>>n; s-=n; } cout<<s<<endl; } }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:62, from /usr/include/c++/14/algorithm:60, from a.cc:2: /usr/include/c++/14/ext/type_traits.h:164:35: error: 'constexpr const bool __gnu_cxx::__is_null_pointer' redeclared as different kind of entity 164 | __is_null_pointer(std::nullptr_t) | ^ /usr/include/c++/14/ext/type_traits.h:159:5: note: previous declaration 'template<class _Type> constexpr bool __gnu_cxx::__is_null_pointer(_Type)' 159 | __is_null_pointer(_Type) | ^~~~~~~~~~~~~~~~~ /usr/include/c++/14/ext/type_traits.h:164:26: error: 'nullptr_t' is not a member of 'std' 164 | __is_null_pointer(std::nullptr_t) | ^~~~~~~~~ In file included from /usr/include/c++/14/bits/stl_pair.h:60, from /usr/include/c++/14/bits/stl_algobase.h:64: /usr/include/c++/14/type_traits:295:27: error: 'size_t' has not been declared 295 | template <typename _Tp, size_t = sizeof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:666:33: error: 'nullptr_t' is not a member of 'std' 666 | struct is_null_pointer<std::nullptr_t> | ^~~~~~~~~ /usr/include/c++/14/type_traits:666:42: error: template argument 1 is invalid 666 | struct is_null_pointer<std::nullptr_t> | ^ /usr/include/c++/14/type_traits:670:48: error: template argument 1 is invalid 670 | struct is_null_pointer<const std::nullptr_t> | ^ /usr/include/c++/14/type_traits:674:51: error: template argument 1 is invalid 674 | struct is_null_pointer<volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:678:57: error: template argument 1 is invalid 678 | struct is_null_pointer<const volatile std::nullptr_t> | ^ /usr/include/c++/14/type_traits:984:26: error: 'size_t' has not been declared 984 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:985:40: error: '_Size' was not declared in this scope 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:985:46: error: template argument 1 is invalid 985 | struct __is_array_known_bounds<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1429:37: error: 'size_t' is not a member of 'std' 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^~~~~~ /usr/include/c++/14/type_traits:1429:57: error: template argument 1 is invalid 1429 | : public integral_constant<std::size_t, alignof(_Tp)> | ^ /usr/include/c++/14/type_traits:1429:57: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1438:37: error: 'size_t' is not a member of 'std' 1438 | : public integral_constant<std::size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1438:46: error: template argument 1 is invalid 1438 | : public integral_constant<std::size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1438:46: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1440:26: error: 'std::size_t' has not been declared 1440 | template<typename _Tp, std::size_t _Size> | ^~~ /usr/include/c++/14/type_traits:1441:21: error: '_Size' was not declared in this scope 1441 | struct rank<_Tp[_Size]> | ^~~~~ /usr/include/c++/14/type_traits:1441:27: error: template argument 1 is invalid 1441 | struct rank<_Tp[_Size]> | ^ /usr/include/c++/14/type_traits:1442:37: error: 'size_t' is not a member of 'std' 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1442:65: error: template argument 1 is invalid 1442 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1442:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1446:37: error: 'size_t' is not a member of 'std' 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1446:65: error: template argument 1 is invalid 1446 | : public integral_constant<std::size_t, 1 + rank<_Tp>::value> { }; | ^ /usr/include/c++/14/type_traits:1446:65: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1451:32: error: 'size_t' was not declared in this scope 1451 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:64:1: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' 63 | #include <bits/version.h> +++ |+#include <cstddef> 64 | /usr/include/c++/14/type_traits:1451:41: error: template argument 1 is invalid 1451 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1451:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1453:26: error: 'size_t' has not been declared 1453 | template<typename _Tp, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1454:23: error: '_Size' was not declared in this scope 1454 | struct extent<_Tp[_Size], 0> | ^~~~~ /usr/include/c++/14/type_traits:1454:32: error: template argument 1 is invalid 1454 | struct extent<_Tp[_Size], 0> | ^ /usr/include/c++/14/type_traits:1455:32: error: 'size_t' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1455:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1455:40: error: '_Size' was not declared in this scope 1455 | : public integral_constant<size_t, _Size> { }; | ^~~~~ /usr/include/c++/14/type_traits:1455:45: error: template argument 1 is invalid 1455 | : public integral_constant<size_t, _Size> { }; | ^ /usr/include/c++/14/type_traits:1455:45: error: template argument 2 is invalid /usr/include/c++/14/type_traits:1457:42: error: 'size_t' has not been declared 1457 | template<typename _Tp, unsigned _Uint, size_t _Size> | ^~~~~~ /usr/include/c++/14/type_traits:1458:23: error: '_Size' was not declared in this scope 1458 | struct extent<_Tp[_Size], _Uint> | ^~~~~ /usr/include/c++/14/type_traits:1458:36: error: template argument 1 is invalid 1458 | struct extent<_Tp[_Size], _Uint> | ^ /usr/include/c++/14/type_traits:1463:32: error: 'size_t' was not declared in this scope 1463 | : public integral_constant<size_t, 0> { }; | ^~~~~~ /usr/include/c++/14/type_traits:1463:32: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1463:41: error: template argument 1 is invalid 1463 | : public integral_constant<size_t, 0> { }; | ^ /usr/include/c++/14/type_traits:1463:41: note: invalid template non-type parameter /usr/include/c++/14/type_traits:1857:26: error: 'size_t' does not name a type 1857 | { static constexpr size_t __size = sizeof(_Tp); }; | ^~~~~~ /usr/include/c++/14/type_traits:1857:26: note: 'size_t' is defined in header '<cstddef>'; this is probably fixable by adding '#include <cstddef>' /usr/include/c++/14/type_traits:1859:14: error: 'size_t' has not been declared 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~~~~ /usr/include/c++/14/type_traits:1859:48: error: '_Sz' was not declared in this scope 1859 | template<size_t _Sz, typename _Tp, bool = (_Sz <= _Tp::__size)> | ^~~ /usr/include/c++/14/type_traits:1860:14: error: no default argument for '_Tp' 1860 | struct __select; | ^~~~~~~~ /usr/include/c++/14/type_traits:1862:14: error: 'size_t' has not been declared 1862 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1863:23: error: '_Sz' was not declared in this scope 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^~~ /usr/include/c++/14/type_traits:1863:57: error: template argument 1 is invalid 1863 | struct __select<_Sz, _List<_Uint, _UInts...>, true> | ^ /usr/include/c++/14/type_traits:1866:14: error: 'size_t' has not been declared 1866 | template<size_t _Sz, typename _Uint, typename... _UInts> | ^~~~~~ /usr/include/c++/14/type_traits:1867:23: error: '_Sz' was not declared in this scope 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false> | ^~~ /usr/include/c++/14/type_traits:1867:58: error: template argument 1 is invalid 1867 | struct __select<_Sz, _List<_Uint, _UInts...>, false>
s337204626
p00466
C++
#include <iostream> using namespace std; int main() { int a,b; if(a=0){ break; } cin>>a; for(int i=0;i<9;i++){ cin>>b; a=a-b; } cout<<a<<endl; return 0; }
a.cc: In function 'int main()': a.cc:7:25: error: break statement not within loop or switch 7 | break; | ^~~~~
s715328087
p00466
C++
#include<iostream> using namespace std; int main(){ int books=0; int book=0; cin>>books; while(i<9){ cin>>book; books-=book; if(books==0){ break; } } cout<<books<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | while(i<9){ | ^
s165920343
p00466
C++
#include<iostream> using namespace std; int main(){ int books=0; int book=0; cin>>books; while(i<9){ cin>>book; books-=book; i++; if(books==0){ break; } } cout<<books<<'\n'; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | while(i<9){ | ^
s507852376
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true) if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c==0; } return 0; }
a.cc: In function 'int main()': a.cc:12:17: error: break statement not within loop or switch 12 | break; | ^~~~~ a.cc: At global scope: a.cc:15:10: error: expected unqualified-id before 'else' 15 | }else{ | ^~~~ a.cc:20:9: error: expected unqualified-id before 'if' 20 | if(c==10){ | ^~ a.cc:24:9: error: expected unqualified-id before 'return' 24 | return 0; | ^~~~~~ a.cc:25:1: error: expected declaration before '}' token 25 | } | ^
s385056055
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c==0; } return 0; }
a.cc: In function 'int main()': a.cc:15:10: error: 'else' without a previous 'if' 15 | }else{ | ^~~~
s012197143
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ cin >> book ; total -= book; c++; } if(c==10){ cout << total << '\n'; c=0; } } return 0; }
a.cc: In function 'int main()': a.cc:15:10: error: 'else' without a previous 'if' 15 | }else{ | ^~~~ a.cc: At global scope: a.cc:25:9: error: expected unqualified-id before 'return' 25 | return 0; | ^~~~~~ a.cc:26:1: error: expected declaration before '}' token 26 | } | ^
s649473789
p00466
C++
#include<iostream> using namespace std; int main(){ int total; cin>>total; int a=0; for(int i=1;i<=9;i++){ cin<<a; a=a+a; } cout<<total-a<<"\n"; return 0; }
a.cc: In function 'int main()': a.cc:10:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 10 | cin<<a; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:10:4: note: candidate: 'operator<<(int, int)' (built-in) 10 | cin<<a; | ~~~^~~ a.cc:10:4: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:10:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 10 | cin<<a; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:10:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 10 | cin<<a; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:10:6: required from here 10 | cin<<a; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s544544544
p00466
C++
#include<iostream> using namespace std; int main(){ int total,book; int c=0; while(true){ if(c==0){ cin >> total; } if(total==0){ break; } c++; }else{ for(c=1;c<10;c++) cin >> book ; total -= book; } if(c==10){ cout << total << '\n'; c=0; } } return 0; }
a.cc: In function 'int main()': a.cc:16:10: error: 'else' without a previous 'if' 16 | }else{ | ^~~~ a.cc: At global scope: a.cc:26:9: error: expected unqualified-id before 'return' 26 | return 0; | ^~~~~~ a.cc:27:1: error: expected declaration before '}' token 27 | } | ^
s361464590
p00466
C++
#include <iostream> using namespace std; int main() { int total,books; while(true) cin>>total; if(total==0){ break; } for(int i=1;i<=9;i++){ cin>>books; total-=books; cout<<total<<"\n"; } return 0; }
a.cc: In function 'int main()': a.cc:11:25: error: break statement not within loop or switch 11 | break; | ^~~~~
s358445213
p00466
C++
#include<iostream> using namespace std; int main() { int num; int a; int b; int c; int d; int e; int f; int g; int h; int i; while(1){ cin >>num; if(num==0){ break;} else{ cin >>a; cin >>b; cin >>c; cin >>d; cin >>e; cin >>f; cin >>g; cin >>h; cin >>i; cout<<num-a-b-c-d-e-f-g-h-i\n; } } return 0; }
a.cc:22:29: error: stray '\' in program 22 | cout<<num-a-b-c-d-e-f-g-h-i\n; | ^ a.cc: In function 'int main()': a.cc:22:29: error: expected ';' before 'n' 22 | cout<<num-a-b-c-d-e-f-g-h-i\n; | ^~ | ;
s474333846
p00466
C++
using namespace std; int main(){ int a,b,i=0,n; cin>>a; do{ if(a>10000){ break; } n=1; cin>>b; a=a-b;i++; if(i==9*n){ cout<<a<<endl;n++; } }while(i<=9*n); return 0; }
a.cc: In function 'int main()': a.cc:4:6: error: 'cin' was not declared in this scope 4 | cin>>a; | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | using namespace std; a.cc:13:6: error: 'cout' was not declared in this scope 13 | cout<<a<<endl;n++; | ^~~~ a.cc:13:6: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:13:15: error: 'endl' was not declared in this scope 13 | cout<<a<<endl;n++; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | using namespace std;
s188861664
p00466
C++
#include<iostream> using namespace std; int main(){ int books=1; int book=0; int i=0; while(books!=0){ cin>>books; if(books==0){ break; } while(i<=8){ cin>>book; books-=book; i++; } if(i==9){ cout<<books<<'\n'; i=0; }
a.cc: In function 'int main()': a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:8:16: note: to match this '{' 8 | while(books!=0){ | ^ a.cc:21:2: error: expected '}' at end of input 21 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s985822272
p00466
C++
#include<iostream> using namespace std; int main(){ int total; cin>>total; while(total!=0){ int a,b,c,d,e,f,g,h,i,j; cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; j=total-(a+b+c+d+e+f+g+h+i); cout<<j<<'\n'; cin>>total; } return 0; }
a.cc: In function 'int main()': a.cc:8:4: error: no match for 'operator<<' (operand types are 'std::istream' {aka 'std::basic_istream<char>'} and 'int') 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ~~~^~~ | | | | | int | std::istream {aka std::basic_istream<char>} a.cc:8:4: note: candidate: 'operator<<(int, int)' (built-in) 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ~~~^~~ a.cc:8:4: note: no known conversion for argument 1 from 'std::istream' {aka 'std::basic_istream<char>'} to 'int' In file included from /usr/include/c++/14/bits/basic_string.h:47, from /usr/include/c++/14/string:54, from /usr/include/c++/14/bits/locale_classes.h:40, from /usr/include/c++/14/bits/ios_base.h:41, from /usr/include/c++/14/ios:44, from /usr/include/c++/14/ostream:40, from /usr/include/c++/14/iostream:41, from a.cc:1: /usr/include/c++/14/string_view:763:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, basic_string_view<_CharT, _Traits>)' 763 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/string_view:763:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/bits/basic_string.h:4077:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 4077 | operator<<(basic_ostream<_CharT, _Traits>& __os, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:4077:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ In file included from /usr/include/c++/14/bits/memory_resource.h:38, from /usr/include/c++/14/string:68: /usr/include/c++/14/cstddef:125:5: note: candidate: 'template<class _IntegerType> constexpr std::__byte_op_t<_IntegerType> std::operator<<(byte, _IntegerType)' 125 | operator<<(byte __b, _IntegerType __shift) noexcept | ^~~~~~~~ /usr/include/c++/14/cstddef:125:5: note: template argument deduction/substitution failed: a.cc:8:1: note: cannot convert 'std::cin' (type 'std::istream' {aka 'std::basic_istream<char>'}) to type 'std::byte' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^~~ In file included from /usr/include/c++/14/bits/ios_base.h:46: /usr/include/c++/14/system_error:339:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const error_code&)' 339 | operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) | ^~~~~~~~ /usr/include/c++/14/system_error:339:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:563:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, _CharT)' 563 | operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) | ^~~~~~~~ /usr/include/c++/14/ostream:563:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:573:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, char)' 573 | operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:573:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:579:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, char)' 579 | operator<<(basic_ostream<char, _Traits>& __out, char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:579:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:590:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, signed char)' 590 | operator<<(basic_ostream<char, _Traits>& __out, signed char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:590:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:595:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, unsigned char)' 595 | operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c) | ^~~~~~~~ /usr/include/c++/14/ostream:595:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:654:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const _CharT*)' 654 | operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:654:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ In file included from /usr/include/c++/14/ostream:1022: /usr/include/c++/14/bits/ostream.tcc:307:5: note: candidate: 'template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(basic_ostream<_CharT, _Traits>&, const char*)' 307 | operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/bits/ostream.tcc:307:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<_CharT, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:671:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const char*)' 671 | operator<<(basic_ostream<char, _Traits>& __out, const char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:671:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:684:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const signed char*)' 684 | operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:684:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:689:5: note: candidate: 'template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(basic_ostream<char, _Traits>&, const unsigned char*)' 689 | operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s) | ^~~~~~~~ /usr/include/c++/14/ostream:689:5: note: template argument deduction/substitution failed: a.cc:8:6: note: 'std::istream' {aka 'std::basic_istream<char>'} is not derived from 'std::basic_ostream<char, _Traits>' 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:810:5: note: candidate: 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&)' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~ /usr/include/c++/14/ostream:810:5: note: template argument deduction/substitution failed: /usr/include/c++/14/ostream: In substitution of 'template<class _Ostream, class _Tp> _Ostream&& std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream<char>&; _Tp = int]': a.cc:8:6: required from here 8 | cin<<a<<b<<c<<d<<e<<f<<g<<h<<i<<j; | ^ /usr/include/c++/14/ostream:810:5: error: no type named 'type' in 'struct std::enable_if<false, void>' 810 | operator<<(_Ostream&& __os, const _Tp& __x) | ^~~~~~~~
s265910178
p00466
C++
#include<iostream> using namespace std; int main() { int total; cin >> total; //初回の総額入力 while(total != 0){ //読み取れなかった価格の計算 int a,b,c,d,e,f,g,h,i; cin >> a >> b >> c >> d >> e >> f >> g >> h >> i; cin >> total;//2回目以降の総額の入力 } cout << total-(a+b+c+d+e+f+g+h+i); return 0; }
a.cc: In function 'int main()': a.cc:15:24: error: 'a' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:26: error: 'b' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:28: error: 'c' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:30: error: 'd' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:32: error: 'e' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:34: error: 'f' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:36: error: 'g' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:38: error: 'h' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^ a.cc:15:40: error: 'i' was not declared in this scope 15 | cout << total-(a+b+c+d+e+f+g+h+i); | ^
s826800149
p00466
C++
loop do x = gets.chomp.to_i break if x == 0 9.times do sum = 0; y = gets.chomp.to_i sum += y end print x - sum end
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~ a.cc:6:21: error: 'y' does not name a type 6 | sum = 0; y = gets.chomp.to_i | ^
s046102657
p00466
C++
loop do sum = gets.chomp.to_i break if sum == 0 9.times do x = gets.chomp.to_i sum -= x end puts sum end
a.cc:1:1: error: 'loop' does not name a type 1 | loop do | ^~~~
s376576210
p00466
C++
#include<stdio.h> int main() { int sum,one; scanf("%d",&sum); for(i=0;i<9;i++){ scanf("%d",&one); sum-=one; } printf("%d",sum); return 0; }
a.cc: In function 'int main()': a.cc:6:7: error: 'i' was not declared in this scope 6 | for(i=0;i<9;i++){ | ^
s090683733
p00466
C++
#include <cstdio> using namespace std; int main() {for(;;){ int s,x; s=0; scanf("%d",&s); if(!s) return 0; for(int i=0;i<10;i++){{ scanf("%d",&x); s-=x; } printf("%d\n",s); } }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:4:1: note: to match this '{' 4 | {for(;;){ | ^
s644907651
p00466
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s609465164
p00466
C++
#include <iostream> using namespace std; int main(){ int sum,t; cin >> sum; for(int i = 0;i < 9;i++){ cin >> t; cum -= t; } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:9:5: error: 'cum' was not declared in this scope; did you mean 'sum'? 9 | cum -= t; | ^~~ | sum
s661489073
p00466
C++
#include <bits/stdc++.h> using namespace std; int main() { int sum; int data; cin >> sum; Rep(i,9) { cin >> data; sum -= data; } cout << sum << endl; return 0; }
a.cc: In function 'int main()': a.cc:8:7: error: 'i' was not declared in this scope 8 | Rep(i,9) { | ^ a.cc:8:3: error: 'Rep' was not declared in this scope 8 | Rep(i,9) { | ^~~
s948248025
p00466
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s052840745
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ int a ,c,sum,ans; int b[9] ={}; sum =0; while(1){ cin >> a; if(a == 0)break; for(int i=0;i<9;i++){ cin >> b[i]; } for(int i=0;i<9;i++){ sum += b[i]; } ans = a -sum; cout << ans << endl; sum = 0; }
a.cc: In function 'int main()': a.cc:28:2: error: expected '}' at end of input 28 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s834954867
p00466
C++
#include<bits/stdc++.h> using namespace std; int main(){ if(int i=0;i<5;i++){ int n; cin>>n; int sum = 0; while(1){ int x; cin>>x; if(x == 0) break; sum = sum + x; } cout<<n-sum<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:16: error: expected ')' before ';' token 7 | if(int i=0;i<5;i++){ | ~ ^ | ) a.cc:7:17: error: 'i' was not declared in this scope 7 | if(int i=0;i<5;i++){ | ^
s118174743
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int h; int x; int y; int z; int a; int b; int c; int d; int f; int g; cin>>h>>x>>y>>z>>a>>b>>c>>d>>f>>g; if(h ==0) break; int e =h-x-y-z-a-b-c-d-f-g; cout<<e<<endl; return 0; }
a.cc: In function 'int main()': a.cc:18:11: error: break statement not within loop or switch 18 | if(h ==0) break; | ^~~~~
s837567346
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int h; cin>>h; for(int i=0;i<=9;i++){ int sum=0; sum +=i } int e=h-sum; cout<<e<<endl; return 0; }
a.cc: In function 'int main()': a.cc:9:9: error: expected ';' before '}' token 9 | sum +=i | ^ | ; 10 | 11 | } | ~ a.cc:12:9: error: 'sum' was not declared in this scope 12 | int e=h-sum; | ^~~
s549501210
p00466
C++
#include <bits/stdc++.h> using namespace std; int main(){ int N, x[10]; int X = 0; for(int j=0;j < 5;j++){ cin>>N; if(N == 0) break; for(int i=1;i < 10;i++){ cin>>x[i]; X += x[i]; } cout<<N - X<<endl } return 0; }
a.cc: In function 'int main()': a.cc:16:24: error: expected ';' before '}' token 16 | cout<<N - X<<endl | ^ | ; 17 | } | ~
s210454818
p00466
C++
#include<iostream> using namespace std; int main() { for (int i = 0; i < 5; i++) { int x, a, b, c, d, e, f, g, h, i, j; cin >> x >> a >> b >> c >> d >> e >> f >> g >> h >> i >> j; cout << x - a - b - c - d - e - f - g - h - i - j << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:48: error: redeclaration of 'int i' 7 | int x, a, b, c, d, e, f, g, h, i, j; | ^ a.cc:6:18: note: 'int i' previously declared here 6 | for (int i = 0; i < 5; i++) { | ^
s591239040
p00466
C++
9850 1050 800 420 380 600 820 2400 1800 980
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9850 | ^~~~
s985612272
p00466
C++
import java.util.Scanner; class Main { public static void main(String args[]) { Scanner sc = new Scanner(System.in); while (true) { int total = sc.nextInt(); if (total == 0)break; for (int i = 0; i < 9; i++) { total -= sc.nextInt(); } System.out.println(total); } } }
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.Scanner; | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:5:15: error: expected ':' before 'static' 5 | public static void main(String args[]) | ^~~~~~~ | : a.cc:5:33: error: 'String' has not been declared 5 | public static void main(String args[]) | ^~~~~~ a.cc:19:2: error: expected ';' after class definition 19 | } | ^ | ; a.cc: In static member function 'static void Main::main(int*)': a.cc:7:17: error: 'Scanner' was not declared in this scope 7 | Scanner sc = new Scanner(System.in); | ^~~~~~~ a.cc:10:37: error: 'sc' was not declared in this scope 10 | int total = sc.nextInt(); | ^~ a.cc:16:25: error: 'System' was not declared in this scope 16 | System.out.println(total); | ^~~~~~
s884941018
p00466
C++
#include <stdio.h> int main(){ int sum, flg = 0, hiku; scanf("%d", &sum); while(int i = 0; i < 9; i++){ scanf("%d", &hiku); sum -= hiku; } printf("%d", sum); return 0; }
a.cc: In function 'int main()': a.cc:6:24: error: expected ')' before ';' token 6 | while(int i = 0; i < 9; i++){ | ~ ^ | ) a.cc:6:26: error: 'i' was not declared in this scope 6 | while(int i = 0; i < 9; i++){ | ^
s004584590
p00466
C++
i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;}
a.cc:1:1: error: 'i' does not name a type 1 | i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;} | ^ a.cc:1:9: error: expected constructor, destructor, or type conversion before '(' token 1 | i,v;main(n){for(;~scanf("%d",i?&v:&n);(i=++i%10)||printf("%d\n",n))n-=v;} | ^
s817144117
p00466
C++
#include <stdio.h> int main(void){ int sum,i; int book[9]; scanf("%d",&sum); for(i=0;i<9;i++){ while(scanf("%d",&book[i]) != 0){ sum -= book[i]; } printf("%d\n",sum); return 0; }
a.cc: In function 'int main()': a.cc:12:2: error: expected '}' at end of input 12 | } | ^ a.cc:2:17: note: to match this '{' 2 | int main(void){ | ^
s711825211
p00466
C++
#include<iostream> using namespace std; int main(){ int sam,p[9]; cin >> sam; if(sam == 0) break; for(int i = 0; i < 9; i++){ cin >> p[i]; } for(int i = 0; i < 9; i++){ sam -= p[i]; } cout << sam << endl; }
a.cc: In function 'int main()': a.cc:9:1: error: break statement not within loop or switch 9 | break; | ^~~~~
s454736407
p00466
C++
#include<iostream> int main(){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:7:5: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 7 | cin >> aa[i]; | ^~~ | std::cin In file included from a.cc:1: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:8:26: error: 'I' was not declared in this scope 8 | for(int i = 1; i < 10; I++) | ^ a.cc:11:3: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 11 | cout << ans << endl; | ^~~~ | std::cout /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:11:18: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 11 | cout << ans << endl; | ^~~~ | std::endl In file included from /usr/include/c++/14/iostream:41: /usr/include/c++/14/ostream:744:5: note: 'std::endl' declared here 744 | endl(basic_ostream<_CharT, _Traits>& __os) | ^~~~
s715754026
p00466
C++
#include<iostream> using namespace std; int main(){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:10:26: error: 'I' was not declared in this scope 10 | for(int i = 1; i < 10; I++) | ^
s261177379
p00466
C++
#include<iostream> using namespace std; int main(){ while(true){ int aa[10] = {0}; int ans = 0, sum = 0; for(int i = 0; i < 10; i++) cin >> aa[i]; if(!aa[0]) break; for(int i = 1; i < 10; I++) sum += aa[i]; ans = aa[0] - sum; cout << ans << endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:26: error: 'I' was not declared in this scope 13 | for(int i = 1; i < 10; I++) | ^
s601003345
p00466
C++
#include<iostream> using namespace std; int main(){ int n,a; while(){ scanf("%d",&n); if(n==0)break; for(int i=0;i<9;i++){ scanf("%d",&a); n-=a; } printf("%d\n",n); }}
a.cc: In function 'int main()': a.cc:6:7: error: expected primary-expression before ')' token 6 | while(){ | ^
s897560398
p00466
C++
#include <stdio.h> main() { int a,b,i; scanf("%d",&a); if(a==0) break; for(i=1;i<11;i++){ scanf("%d",&b); a-=b; } printf("%d\n",a); }
a.cc:3:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type] 3 | main() | ^~~~ a.cc: In function 'int main()': a.cc:7:18: error: break statement not within loop or switch 7 | if(a==0) break; | ^~~~~
s884369020
p00466
C++
#include <iostream> using namespace std; int main () { int a,b,c,d,e,f,g,h,i,j; cin>>a>>b>>c>>d>>e>>f>>g>>h>>i>>j; if (a==0) break; cout<<a-(b+c+d+e+f+g+h+i+j)<<endl; return 0; }
a.cc: In function 'int main()': a.cc:6:15: error: break statement not within loop or switch 6 | if (a==0) break; | ^~~~~
s989865039
p00466
C++
#include <iostream> using namespace std; int main() { // your code goes here int sum,r[10],real=0; cin >> sum; for(int i=0;i<10;i++){ cin >> r[i]; real+=r[i]; } for(int i=0;i<10;i++){ if(real-r[i]==sum) cout << r[i] << endl: } return 0; }
a.cc: In function 'int main()': a.cc:14:37: error: expected ';' before ':' token 14 | cout << r[i] << endl: | ^ | ;
s234059478
p00467
Java
package Chapter3; import java.util.Scanner; public class AOJ5_44 { public static void main(String arg[]) { Scanner in = new Scanner(System.in); while(in.hasNext()) { int n=in.nextInt(); int m=in.nextInt(); if((n|m)==0) return; int a[]=new int[n]; int b[]=new int[m]; for(int i=0;i<n;i++) a[i]=in.nextInt(); for(int j=0;j<m;j++) b[j]=in.nextInt(); int now=0; for(int j=0;j<m;j++) { now+=b[j]; if(now>=n-1) { System.out.println(j+1); break; } now+=a[now]; if(now>=n-1) { System.out.println(j+1); break; } } } } }
Main.java:4: error: class AOJ5_44 is public, should be declared in a file named AOJ5_44.java public class AOJ5_44 ^ 1 error
s722150635
p00467
C
#include <stdio.h> int a[1000],b[1000]; int main(){ int N,M,i,c=1; while(1){ c=1; scanf("%d %d",&N,&M); if(N==0&&M==0){ return 0; } for(i=0;i<N;i++){ scanf("%d",&a[i]); } for(i=0;i<M;i++){ scanf("%d",&b[i]); } for(i=0;i<M;i++){ c+=b[i]; if(c>=N){ printf("%d\n",i+1); break; } c+=a[c-1]; f(c>=N){ printf("%d\n",i+1); break; } } } }
main.c: In function 'main': main.c:24:25: error: implicit declaration of function 'f' [-Wimplicit-function-declaration] 24 | f(c>=N){ | ^ main.c:24:32: error: expected ';' before '{' token 24 | f(c>=N){ | ^ | ;
s287767174
p00467
C
#include<stdio.h> int main(void){ int n,m,i,sum=0,ans=0; int masu[1000]={0},sai[1000]; (scanf("%d %d",&n,&m) if(n==0) break; for(i=0;i<n;i++){ scanf("%d",&masu[i]); } for(i=0;i<m;i++){ scanf("%d",&sai[i]); } for(i=0;i<m;i++){ if(sum+1>=n) break; sum+=sai[i]; sum+=masu[sum]; ans++; } printf("%d\n",ans); return 0; }
main.c: In function 'main': main.c:6:30: error: expected ')' before 'if' 6 | (scanf("%d %d",&n,&m) | ~ ^ | ) 7 | if(n==0) break; | ~~ main.c:23:18: error: expected ';' before '}' token 23 | return 0; | ^ | ; 24 | } | ~
s414246111
p00467
C
#include <stdio.h> int main(void) { int m, n; int masu[2000]; int now; int dice; int i; while (1) { now = 1; flag = 1; scanf("%d %d", &n, &m); if (!n) break; for (i = 1; i <= n; i++) { scanf("%d", &masu[i]); } for (i = 1; now <= n; i++) { scanf("%d", &dice); now += dice; now += masu[now]; } printf("%d\n", i - 1); while (m - i) { scanf("%d", &dice); m--; } } return (0); }
main.c: In function 'main': main.c:13:17: error: 'flag' undeclared (first use in this function) 13 | flag = 1; | ^~~~ main.c:13:17: note: each undeclared identifier is reported only once for each function it appears in
s846747977
p00467
C
#include <stdio.h> int main() { int i1, N, M, *n, *m, sw = 0, s = 0, ct = 0; scanf("%d %d", &N, &M); n = new int [N]; m = new int [M]; for (i1 = 0; i1 < N; i1++) scanf("%d", &n[i1]); for (i1 = 0; i1 < M; i1++) scanf("%d", &m[i1]); while (sw == 0) { s += m[ct]; ct++; if (s >= N-1) sw = 1; else { s += n[s]; if (s >= N-1) sw = 1; } } printf("%d\n", ct); return 0; }
main.c: In function 'main': main.c:6:13: error: 'new' undeclared (first use in this function) 6 | n = new int [N]; | ^~~ main.c:6:13: note: each undeclared identifier is reported only once for each function it appears in main.c:6:16: error: expected ';' before 'int' 6 | n = new int [N]; | ^~~~ | ; main.c:7:16: error: expected ';' before 'int' 7 | m = new int [M]; | ^~~~ | ;