submission_id
stringlengths
10
10
problem_id
stringlengths
6
6
language
stringclasses
3 values
code
stringlengths
1
522k
compiler_output
stringlengths
43
10.2k
s449796031
p00008
C++
#include <iostream> int main(void){ int input=0; int output=0; for(int a =0; a<9 ; a++){ for(int b=0; b<9; b++){ for(int c=0; c<9;c++){ for(int d=0; d<9;d++){ int abcd=a+b+c+d; if(abcd==input){ output++; } } } } cout << output; }
a.cc: In function 'int main()': a.cc:20:9: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 20 | cout << output; | ^~~~ | std::cout In file included from a.cc:1: /usr/include/c++/14/iostream:63:18: note: 'std::cout' declared here 63 | extern ostream cout; ///< Linked to standard output | ^~~~ a.cc:21:8: error: expected '}' at end of input 21 | } | ^ a.cc:3:15: note: to match this '{' 3 | int main(void){ | ^
s700746120
p00008
C++
#include <iostream> using namespace std; int main(void){ int input=0; int output=0; for(int a =0; a<9 ; a++){ for(int b=0; b<9; b++){ for(int c=0; c<9;c++){ for(int d=0; d<9;d++){ int abcd=a+b+c+d; if(abcd==input){ output++ } } } } } cout << output; }
a.cc: In function 'int main()': a.cc:15:49: error: expected ';' before '}' token 15 | output++ | ^ | ; 16 | } | ~
s044743805
p00008
C++
V#include<iostream> int main(){ int a,b,c,d,i,n; i=0; std::cin>>n; for(a=0;a<=9;a++){ for(b=0;b<=9;b++){ for(c=0;c<=9;c++){ for(d=0;d<=9;d++){ if(a+b+c+d==n){ i++; } } } } } std::cout<<i<<std::endl; return 0; }
a.cc:1:2: error: stray '#' in program 1 | V#include<iostream> | ^ a.cc:1:1: error: 'V' does not name a type 1 | V#include<iostream> | ^
s702671434
p00008
C++
#include <iostream> using namespace std; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; while(cin >> n){ int ans = 0; for(int i = 0; i <= 9; ++i){ for(int j = 0; j <= 9; ++j){ for(int k = 0; k <= 9; ++k){ for(int l = 0; l <= 9; ++l){ if(i + j + k + l == n){ ans++; } } } } }
a.cc: In function 'int main()': a.cc:22:10: error: expected '}' at end of input 22 | } | ^ a.cc:9:24: note: to match this '{' 9 | while(cin >> n){ | ^ a.cc:22:10: error: expected '}' at end of input 22 | } | ^ a.cc:4:11: note: to match this '{' 4 | int main(){ | ^
s683877387
p00008
C++
??£??£???
a.cc:1:3: error: extended character £ is not valid in an identifier 1 | ??£??£??? | ^ a.cc:1:6: error: extended character £ is not valid in an identifier 1 | ??£??£??? | ^ a.cc:1:1: error: expected unqualified-id before '?' token 1 | ??£??£??? | ^
s503390625
p00008
C++
#include<iostream> using namespace std; int main(void) { int ans = 0; int in; int table[51]; memset(table, 0, sizeof(table)); for(int a = 0; a < 10; a++) { for(int b = 0; b < 10; b++) { for(int c = 0; c < 10; c++) { for(int d = 0; d < 10; d++) { table[a + b + c + d]++; } } } } while(cin) { cin >> in; cout << table[in] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:3: error: 'memset' was not declared in this scope 9 | memset(table, 0, sizeof(table)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s030208412
p00008
C++
#include<iostream> using namespace std; int main(void) { int in; int table[51]; memset(table, 0, sizeof(table)); for(int a = 0; a < 10; a++) { for(int b = 0; b < 10; b++) { for(int c = 0; c < 10; c++) { for(int d = 0; d < 10; d++) { table[a + b + c + d]++; } } } } while(cin) { cin >> in; cout << table[in] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:3: error: 'memset' was not declared in this scope 8 | memset(table, 0, sizeof(table)); | ^~~~~~ a.cc:2:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 1 | #include<iostream> +++ |+#include <cstring> 2 | using namespace std;
s709465814
p00008
C++
#include <iostream> #include <string> #include <algorithm> #include <stdio.h> using namespace std; // cin >> // cout << int main(){ int in=0; while(scanf("%d",&in)!=EOF){ int out=0; for(int i=0;i<10;i++){ for(int j=0;j<10;j++){ for(int k=0;k<10;k++){ for(int l=0;l<10;l++){ if(i+j+k+l==in){ out++; } } } } } } printf("%d\n",count); return 0; }
a.cc: In function 'int main()': a.cc:27:15: error: overloaded function with no contextual type information 27 | printf("%d\n",count); | ~~~~~~^~~~~~~~~~~~~~
s812500044
p00008
C++
include <iostream> using namespace std; int main(){ int n,ans; while( cin >> n ){ ans = 0; if(n<=36){ for(int a=0 ; a<=9 ; a++){ for(int b=0 ; b<=9 ; b++){ for(int c=0 ; c<=9 ; c++){ for(int d=0 ; d<=9 ; d++){ if((a+b+c+d)==n){ ans++; } } } } } } cout << ans << endl; } }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:16: error: 'cin' was not declared in this scope 7 | while( cin >> n ){ | ^~~ a.cc:22:17: error: 'cout' was not declared in this scope 22 | cout << ans << endl; | ^~~~ a.cc:22:32: error: 'endl' was not declared in this scope 22 | cout << ans << endl; | ^~~~
s158437280
p00008
C++
include<iostream> using namespace std; int main(){ int n; while(cin >>n){ int solve = 0; for(int i=0; i<10; i++) for(int j=0; j<10; j++) for(int k=0; k<10; k++) for(int l=0;l<10;l++) if(i+j+k+l==n) solve++; cout <<solve<<endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include<iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:5:9: error: 'cin' was not declared in this scope 5 | while(cin >>n){ | ^~~ a.cc:12:5: error: 'cout' was not declared in this scope 12 | cout <<solve<<endl; | ^~~~ a.cc:12:19: error: 'endl' was not declared in this scope 12 | cout <<solve<<endl; | ^~~~
s467651927
p00008
C++
#include<iostream> using namespace std; int main() { int n,x=0; while(cin>>n) { for(int i=0;i<9;i++){ for(int j=0;j<9;j++){ for(int k=0;k<9;k++){ d=n-i-j-k; if(d>=0&&d<=9) x++; } } } cout<<x<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:13:21: error: 'd' was not declared in this scope 13 | d=n-i-j-k; | ^
s698570578
p00008
C++
#include <iostream> using namespace std; int main(){ int a, b, c, d; int n; while(cin >> n){ for(a=0; a<=9; a++){ for(b=0; b<=9; b++){ for(c=0; c<=9; c++){ for(d=0; d<=9; d++){ if(a+b+c+d == n){ count = count +1; } } } } } cout << count <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:49: error: 'count' was not declared in this scope 17 | count = count +1; | ^~~~~ a.cc:24:17: error: 'count' was not declared in this scope 24 | cout << count <<endl; | ^~~~~
s425123520
p00008
C++
#include <iostream> using namespace std; int main(){ int a, b, c, d; int n; while(cin >> n){ for(a=0; a<=9; a++){ for(b=0; b<=9; b++){ for(c=0; c<=9; c++){ for(d=0; d<=9; d++){ if(a+b+c+d == n){ count = count +1; } } } } } cout << count <<endl; } }
a.cc: In function 'int main()': a.cc:17:49: error: 'count' was not declared in this scope 17 | count = count +1; | ^~~~~ a.cc:24:17: error: 'count' was not declared in this scope 24 | cout << count <<endl; | ^~~~~
s282823123
p00008
C++
#include<iostream> using namespace std; int main(){ int n,val; while(cin >> n;){ val = 0; for(int i=0;i<=9;i++){ for(int j=0;j<=9;j++){ for(int k=0;k<=9;k++){ for(int l=0;l<=9;l++){ if(i+j+k+l == n){ val += 1; } } } } } cout << val << endl; } return 0; }
a.cc: In function 'int main()': a.cc:6:23: error: expected ')' before ';' token 6 | while(cin >> n;){ | ~ ^ | ) a.cc:6:24: error: expected primary-expression before ')' token 6 | while(cin >> n;){ | ^
s650429136
p00008
C++
#include <iostream> using namespace std; #define rep(i,n) for(int i = 0;i < n;i++) int main(){ int n; while(cin >> n){ int ans = 0; rep(i,10)rep(j,10)rep(k,10)rep(l,10){ if(i + j + k + l == n){ ans++; } } } cout << ans << endl; return 0; }
a.cc: In function 'int main()': a.cc:17:10: error: 'ans' was not declared in this scope; did you mean 'abs'? 17 | cout << ans << endl; | ^~~ | abs
s458198568
p00008
C++
#include <stdlib.h> int main() { int n,a,b,c,d,i,j,k,l,cnt=0; scanf("%d",&n); for (i=0;i<=9;i++){ for (j=0;j<=9;j++){ for (k=0;k<=9;k++){ for (l=0;l<=9;l++){ if (i+j+k+l==n) cnt=cnt+1; else continue; } } } } printf("%d\n",cnt); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'scanf' was not declared in this scope 6 | scanf("%d",&n); | ^~~~~ a.cc:19:5: error: 'printf' was not declared in this scope 19 | printf("%d\n",cnt); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include <stdlib.h> +++ |+#include <cstdio> 2 |
s179094890
p00008
C++
#include <stdlib.h> int main() { int n,i,j,k,l,cnt=0; scanf("%d",&n); for (i=0;i<=9;i++){ for (j=0;j<=9;j++){ for (k=0;k<=9;k++){ for (l=0;l<=9;l++){ if (i+j+k+l==n) cnt=cnt+1; } } } } printf("%d\n",cnt); return 0; }
a.cc: In function 'int main()': a.cc:6:5: error: 'scanf' was not declared in this scope 6 | scanf("%d",&n); | ^~~~~ a.cc:17:5: error: 'printf' was not declared in this scope 17 | printf("%d\n",cnt); | ^~~~~~ a.cc:2:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' 1 | #include <stdlib.h> +++ |+#include <cstdio> 2 |
s623077625
p00008
C++
a
a.cc:1:1: error: 'a' does not name a type 1 | a | ^
s600834105
p00008
C++
include <iostream> using namespace std; int main(){ int s; while(cin >> s){ int c = 0; for (int i = 0; i <= 9; i++){ for (int j = 0; j <= 9; j++){ for (int k = 0; k <= 9; k++){ for (int l = 0; l <= 9; l++){ if ((i+j+k+l) == s){ c++; } } } } } cout << c; } }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | while(cin >> s){ | ^~~ a.cc:20:5: error: 'cout' was not declared in this scope 20 | cout << c; | ^~~~
s489394551
p00008
C++
include <iostream> using namespace std; int main(){ int s; while(cin >> s){ int c = 0; for (int i = 0; i <= 9; i++){ for (int j = 0; j <= 9; j++){ for (int k = 0; k <= 9; k++){ for (int l = 0; l <= 9; l++){ if ((i+j+k+l) == s){ c++; } } } } } cout << c << endl; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | while(cin >> s){ | ^~~ a.cc:20:5: error: 'cout' was not declared in this scope 20 | cout << c << endl; | ^~~~ a.cc:20:18: error: 'endl' was not declared in this scope 20 | cout << c << endl; | ^~~~ a.cc:21:4: error: expected '}' at end of input 21 | } | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s422066664
p00008
C++
#include <iostream> #include <algorithm> #include <set> #include <vector> using namespace std; int solve(const int n) { set< vector<int> > s; vector<int> v(4); for (v[0] = 0; v[0] < 10; v[0]++) for (v[1] = 0; v[1] < 10; v[1]++) for (v[2] = 0; v[2] < 10; v[2]++) for (v[3] = 0; v[3] < 10; v[3]++) { int sum = 0; for (int i = 0; i < 4; i++) sum += v[i]; if (sum == n) { s.insert(v); break; } } return s.size(); } int main() { cin.tie(0); ios::sync_with_stdio(false); while (cin)) { int n; cin >> n; cout << solve(n) << endl; } return 0; }
a.cc: In function 'int main()': a.cc:29:20: error: expected primary-expression before ')' token 29 | while (cin)) { | ^
s672951895
p00008
C++
#include <stdio.h> using namespace std; #define rep(i,a,n) for(int i=a; i<n; i++) int main() { int n; while(cin >> n) { int cnt = 0; rep(a,0,10) rep(b,0,10) rep(c,0,10) rep(d,0,10) { if(a + b + c + d == n) cnt++; } cout << cnt << endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:7: error: 'cin' was not declared in this scope 7 | while(cin >> n) { | ^~~ a.cc:2:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' 1 | #include <stdio.h> +++ |+#include <iostream> 2 | using namespace std; a.cc:12:1: error: 'cout' was not declared in this scope 12 | cout << cnt << endl; | ^~~~ a.cc:12:1: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:12:16: error: 'endl' was not declared in this scope 12 | cout << cnt << endl; | ^~~~ a.cc:2:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' 1 | #include <stdio.h> +++ |+#include <ostream> 2 | using namespace std;
s432486436
p00008
C++
//#define scanf_s scanf #include <stdio.h> #include <string> #include <iostream> using namespace std; #define MAX 20 int main(void) { int n,cou = 0; int i = 0, j = 0, l = 0, k = 0; while (scanf_s("%d", &n) != EOF) { for (int i = 0; i <= 9 && i <= n; ++i) { for (int j = 0; j <= 9 && i + j <= n; ++j) { for (int l = 0; l <= 9 && i + j + l <= n; ++l) { for (int k = 0; k <= 9 && i + j + l + k <= n; ++k) { if (i + j + l + k == n) ++cou; } } } } printf("%d\n", cou); cou = 0; } }
a.cc: In function 'int main()': a.cc:11:16: error: 'scanf_s' was not declared in this scope; did you mean 'scanf'? 11 | while (scanf_s("%d", &n) != EOF) { | ^~~~~~~ | scanf
s980614042
p00008
C++
$include<iostream> using namespace std; int main(){ int n; cin>>n; int counter=0; for(int a=0;a<10;a++){ for(int b=0;b<10;b++){ for(int c=0;c<10;c++){ if(1<=n-a-b-c && n-a-b-c<=9){ counter++; } } } } cout<<counter<<endl; return 0; }
a.cc:1:1: error: '$include' does not name a type 1 | $include<iostream> | ^~~~~~~~ a.cc: In function 'int main()': a.cc:5:1: error: 'cin' was not declared in this scope 5 | cin>>n; | ^~~ a.cc:16:1: error: 'cout' was not declared in this scope 16 | cout<<counter<<endl; | ^~~~ a.cc:16:16: error: 'endl' was not declared in this scope 16 | cout<<counter<<endl; | ^~~~
s932733125
p00008
C++
#include<iostream> #include<algorithm> #include<cmath> using namespace std; int main(){ int n; while(cin >> n){ int a, b, c, d, cnt = 0; for(int a = 0, a < 10, a++){ for(int b = 0, b < 10, b++){ for(int c = 0, c < 10, c++){ for(int d = 0, d < 10, d++){ if(a + b + c + d == n) cnt++; } } } } cout << cnt << endl; } }
a.cc: In function 'int main()': a.cc:10:21: error: expected ';' before '<' token 10 | for(int a = 0, a < 10, a++){ | ^~ | ; a.cc:10:22: error: expected primary-expression before '<' token 10 | for(int a = 0, a < 10, a++){ | ^ a.cc:10:31: error: expected ';' before ')' token 10 | for(int a = 0, a < 10, a++){ | ^ | ; a.cc:11:23: error: expected ';' before '<' token 11 | for(int b = 0, b < 10, b++){ | ^~ | ; a.cc:11:24: error: expected primary-expression before '<' token 11 | for(int b = 0, b < 10, b++){ | ^ a.cc:11:33: error: expected ';' before ')' token 11 | for(int b = 0, b < 10, b++){ | ^ | ; a.cc:12:25: error: expected ';' before '<' token 12 | for(int c = 0, c < 10, c++){ | ^~ | ; a.cc:12:26: error: expected primary-expression before '<' token 12 | for(int c = 0, c < 10, c++){ | ^ a.cc:12:35: error: expected ';' before ')' token 12 | for(int c = 0, c < 10, c++){ | ^ | ; a.cc:13:27: error: expected ';' before '<' token 13 | for(int d = 0, d < 10, d++){ | ^~ | ; a.cc:13:28: error: expected primary-expression before '<' token 13 | for(int d = 0, d < 10, d++){ | ^ a.cc:13:37: error: expected ';' before ')' token 13 | for(int d = 0, d < 10, d++){ | ^ | ;
s746107942
p00008
C++
#include<iostream> using namespace std; int x,ans; int main(){ for(){ ans=0; cin>>x; if(x=<0)return 0; for(int i=0;i<10;i++){ for(int j=0;i<10;j++){ for(int k=0;k<10;k++){ if(x-(i+j+k)<10){ ans++; } } } } cout<<ans; } return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: expected primary-expression before ')' token 5 | for(){ | ^ a.cc:20:1: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:2: error: expected ';' before 'return' 19 | } | ^ | ; 20 | return 0; | ~~~~~~ a.cc:20:1: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:2: error: expected ')' before 'return' 19 | } | ^ | ) 20 | return 0; | ~~~~~~ a.cc:5:4: note: to match this '(' 5 | for(){ | ^
s045123612
p00008
C++
#include<iostream> using namespace std; int x,ans; int main(){ for(){ ans=0; cin>>x; if(x=<0)return 0; for(int i=0;i<10;i++){ for(int j=0;i<10;j++){ for(int k=0;k<10;k++){ if(x-(i+j+k)<10){ ans++; } } } } cout<<ans; } return 0; }
a.cc: In function 'int main()': a.cc:5:5: error: expected primary-expression before ')' token 5 | for(){ | ^ a.cc:20:1: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:2: error: expected ';' before 'return' 19 | } | ^ | ; 20 | return 0; | ~~~~~~ a.cc:20:1: error: expected primary-expression before 'return' 20 | return 0; | ^~~~~~ a.cc:19:2: error: expected ')' before 'return' 19 | } | ^ | ) 20 | return 0; | ~~~~~~ a.cc:5:4: note: to match this '(' 5 | for(){ | ^
s056979553
p00008
C++
#include<iostream> using namespace std; int x,ans; int main(){ while(1){ ans=0; cin>>x; if(x=<0)return 0; for(int i=0;i<10;i++){ for(int j=0;i<10;j++){ for(int k=0;k<10;k++){ if(x-(i+j+k)<10){ ans++; } } } } cout<<ans; } return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: expected primary-expression before '<' token 8 | if(x=<0)return 0; | ^
s642284750
p00008
C++
#include<iostream> #include<algorithm> using namespace std; int main(){ int a=0; while(cin>>n){ int a=0; for(int i=0;i<=9;i++){ for(int j=0;j<=9;j++){ for(int k=0;k<=9;k++){ for(int l=0;l<=9;l++){ if(i+j+k+l==n) a+=1; } } } } cout<<a<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:7:20: error: 'n' was not declared in this scope 7 | while(cin>>n){ | ^
s242529326
p00008
C++
#include <bits/stdc++.h> using namespace std; int main() { int n; while (cin >> n) { int cnt = 0; for (int i = 0; i = 10; i++) { for (int j = 0; j = 10; j++) { for (int k = 0; k = 10; k++) { if (0 <= n - i - j - k && n - i - j - k < 10) cnt++; } } } cout << cnt << endl; }
a.cc: In function 'int main()': a.cc:15:2: error: expected '}' at end of input 15 | } | ^ a.cc:3:12: note: to match this '{' 3 | int main() { | ^
s145746724
p00008
C++
#include<iostream> using namespace std; #define MAX 256 int kai (int x){ if(x == 1 || x == 0)return 1; return x * kai(x - 1); } int miku(int x){ if(x > 36)return 0; if(x < 10)return kai(x + 3) / ( kai(x) * 6); if(x > 19)return miku(36 - x); if(x > 9 && x < 19)return kai(x + 3) / ( kai(x) * 6) - (miku(x - 10) * 4); } int main(void){ int n,i = 0; int ans[MAX]; while( cin >> n != EOF){ ans[i] = miku(n); i++; } for(int j = 0;j < i;j++){ cout << ans [j] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:23:25: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 23 | while( cin >> n != EOF){ | ~~~~~~~~ ^~ | | | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:23:25: note: candidate: 'operator!=(int, int)' (built-in) 23 | while( cin >> n != EOF){ | ^ a.cc:23:25: 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/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:1: /usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)' 197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, 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: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::fpos<_StateT>' 23 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)' 243 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::allocator<_CharT>' 23 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 455 | operator!=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 500 | operator!=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1686 | operator!=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1753 | operator!=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 23 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 23 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 651 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:651:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:658:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 658 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:658:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:666:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 666 | operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:666:5: note: template argument deduction/substitution failed: a.cc:23:28: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3833 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3847 | operator!=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: template argument deduction/substitution failed: a.cc:23:28: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 23 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3860 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 23 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2613:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2613 | operator!=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2613:5: note: template argument deduction/substitution failed: a.cc:23:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 23 | while( cin >> n != EOF){
s487674444
p00008
C++
#include<iostream> #include<stdio.h> using namespace std; #define MAX 256 int kai (int x){ if(x == 1 || x == 0)return 1; return x * kai(x - 1); } int miku(int x){ if(x > 36)return 0; if(x < 10)return kai(x + 3) / ( kai(x) * 6); if(x > 19)return miku(36 - x); if(x > 9 && x < 19)return kai(x + 3) / ( kai(x) * 6) - (miku(x - 10) * 4); } int main(void){ int n,i = 0; int ans[MAX]; while( cin >> n != EOF){ ans[i] = miku(n); i++; } for(int j = 0;j < i;j++){ cout << ans [j] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:24:25: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 24 | while( cin >> n != EOF){ | ~~~~~~~~ ^~ | | | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:24:25: note: candidate: 'operator!=(int, int)' (built-in) 24 | while( cin >> n != EOF){ | ^ a.cc:24:25: 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/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:1: /usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)' 197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, 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: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::fpos<_StateT>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)' 243 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::allocator<_CharT>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 455 | operator!=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 500 | operator!=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1686 | operator!=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1753 | operator!=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 651 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:651:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:658:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 658 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:658:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:666:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 666 | operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:666:5: note: template argument deduction/substitution failed: a.cc:24:28: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3833 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3847 | operator!=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: template argument deduction/substitution failed: a.cc:24:28: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3860 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2613:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2613 | operator!=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2613:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 24 | while( cin >> n != EOF){
s551489691
p00008
C++
#include<iostream> #include<stdio.h> using namespace std; #define MAX 256 int kai (int x){ if(x == 1 || x == 0)return 1; return x * kai(x - 1); } int miku(int x){ if(x > 36)return 0; if(x < 10)return kai(x + 3) / ( kai(x) * 6); if(x > 19)return miku(36 - x); if(x > 9 && x < 19)return kai(x + 3) / ( kai(x) * 6) - (miku(x - 10) * 4); } int main(void){ int n,i = 0; int ans[MAX]; while( cin >> n != EOF){ ans[i] = miku(n); i++; } for(int j = 0;j < i;j++){ cout << ans [j] <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:24:25: error: no match for 'operator!=' (operand types are 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} and 'int') 24 | while( cin >> n != EOF){ | ~~~~~~~~ ^~ | | | std::basic_istream<char>::__istream_type {aka std::basic_istream<char>} a.cc:24:25: note: candidate: 'operator!=(int, int)' (built-in) 24 | while( cin >> n != EOF){ | ^ a.cc:24:25: 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/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:1: /usr/include/c++/14/bits/postypes.h:197:5: note: candidate: 'template<class _StateT> bool std::operator!=(const fpos<_StateT>&, const fpos<_StateT>&)' 197 | operator!=(const fpos<_StateT>& __lhs, const fpos<_StateT>& __rhs) | ^~~~~~~~ /usr/include/c++/14/bits/postypes.h:197:5: note: template argument deduction/substitution failed: In file included from /usr/include/c++/14/cstdio:42, from /usr/include/c++/14/ext/string_conversions.h:45, from /usr/include/c++/14/bits/basic_string.h:4154, 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: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::fpos<_StateT>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:43: /usr/include/c++/14/bits/allocator.h:243:5: note: candidate: 'template<class _T1, class _T2> bool std::operator!=(const allocator<_CharT>&, const allocator<_T2>&)' 243 | operator!=(const allocator<_T1>&, const allocator<_T2>&) | ^~~~~~~~ /usr/include/c++/14/bits/allocator.h:243:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::allocator<_CharT>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/string:48: /usr/include/c++/14/bits/stl_iterator.h:455:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_Iterator>&)' 455 | operator!=(const reverse_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:455:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const reverse_iterator<_Iterator>&, const reverse_iterator<_IteratorR>&)' 500 | operator!=(const reverse_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:500:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::reverse_iterator<_Iterator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: candidate: 'template<class _IteratorL, class _IteratorR> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorR>&)' 1686 | operator!=(const move_iterator<_IteratorL>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1686:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: candidate: 'template<class _Iterator> constexpr bool std::operator!=(const move_iterator<_IteratorL>&, const move_iterator<_IteratorL>&)' 1753 | operator!=(const move_iterator<_Iterator>& __x, | ^~~~~~~~ /usr/include/c++/14/bits/stl_iterator.h:1753:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::move_iterator<_IteratorL>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/stl_algobase.h:64, from /usr/include/c++/14/string:51: /usr/include/c++/14/bits/stl_pair.h:1052:5: note: candidate: 'template<class _T1, class _T2> constexpr bool std::operator!=(const pair<_T1, _T2>&, const pair<_T1, _T2>&)' 1052 | operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) | ^~~~~~~~ /usr/include/c++/14/bits/stl_pair.h:1052:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::pair<_T1, _T2>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/basic_string.h:47: /usr/include/c++/14/string_view:651:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, basic_string_view<_CharT, _Traits>)' 651 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:651:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:658:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(basic_string_view<_CharT, _Traits>, __type_identity_t<basic_string_view<_CharT, _Traits> >)' 658 | operator!=(basic_string_view<_CharT, _Traits> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:658:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>' is not derived from 'std::basic_string_view<_CharT, _Traits>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/string_view:666:5: note: candidate: 'template<class _CharT, class _Traits> constexpr bool std::operator!=(__type_identity_t<basic_string_view<_CharT, _Traits> >, basic_string_view<_CharT, _Traits>)' 666 | operator!=(__type_identity_t<basic_string_view<_CharT, _Traits>> __x, | ^~~~~~~~ /usr/include/c++/14/string_view:666:5: note: template argument deduction/substitution failed: a.cc:24:28: note: mismatched types 'std::basic_string_view<_CharT, _Traits>' and 'int' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3833 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3833:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const _CharT*, const __cxx11::basic_string<_CharT, _Traits, _Allocator>&)' 3847 | operator!=(const _CharT* __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3847:5: note: template argument deduction/substitution failed: a.cc:24:28: note: mismatched types 'const _CharT*' and 'std::basic_istream<char>' 24 | while( cin >> n != EOF){ | ^~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: candidate: 'template<class _CharT, class _Traits, class _Alloc> bool std::operator!=(const __cxx11::basic_string<_CharT, _Traits, _Allocator>&, const _CharT*)' 3860 | operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs, | ^~~~~~~~ /usr/include/c++/14/bits/basic_string.h:3860:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::__cxx11::basic_string<_CharT, _Traits, _Allocator>' 24 | while( cin >> n != EOF){ | ^~~ In file included from /usr/include/c++/14/bits/memory_resource.h:47, from /usr/include/c++/14/string:68: /usr/include/c++/14/tuple:2613:5: note: candidate: 'template<class ... _TElements, class ... _UElements> constexpr bool std::operator!=(const tuple<_UTypes ...>&, const tuple<_Elements ...>&)' 2613 | operator!=(const tuple<_TElements...>& __t, | ^~~~~~~~ /usr/include/c++/14/tuple:2613:5: note: template argument deduction/substitution failed: a.cc:24:28: note: 'std::basic_istream<char>::__istream_type' {aka 'std::basic_istream<char>'} is not derived from 'const std::tuple<_UTypes ...>' 24 | while( cin >> n != EOF){
s585287370
p00008
C++
#include<iostream> #include<cstdio> using namespace std; int main(){int n;while(cin >> n){int cnt = 0;for(int a = 0;a <= 9;a++){for(int b = 0;b <= 9;b++){for(int c = 0;c <= 9;c++){for(int d = 0;d <= 9;d++){if((a + b + c + d) == n){cnt++;}}}}}cout << cnt <<endl;} return 0;
a.cc: In function 'int main()': a.cc:5:10: error: expected '}' at end of input 5 | return 0; | ^ a.cc:4:11: note: to match this '{' 4 | int main(){int n;while(cin >> n){int cnt = 0;for(int a = 0;a <= 9;a++){for(int b = 0;b <= 9;b++){for(int c = 0;c <= 9;c++){for(int d = 0;d <= 9;d++){if((a + b + c + d) == n){cnt++;}}}}}cout << cnt <<endl;} | ^
s218130008
p00008
C++
#include<iostream> #include<algorithm> #include<cstdio> using namespace std; int main(){ int n; while(cin >> n){ int cnt = 0; for(int a = 0;a <= 9;a++){ for(int b = 0;b <= 9;b++){ for(int c = 0;c <= 9;c++){ for(int d = 0;d <= 9;d++){ if((a + b + c + d) == n){ cnt++; } } } } } cout << cnt <<endl; } return 0;
a.cc: In function 'int main()': a.cc:22:10: error: expected '}' at end of input 22 | return 0; | ^ a.cc:5:11: note: to match this '{' 5 | int main(){ | ^
s843476887
p00008
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,n,num; while(cin >> n){ count = 0; for(a = 0;a <=9;a++){ for(b = 0;b <=9;b++){ for(c = 0;c <=9;c++){ for(d = 0;d <=9;d++){ if(a+b+c+d == n){num++;} }}}} cout << count << endl; } }
a.cc: In function 'int main()': a.cc:7:5: error: 'count' was not declared in this scope 7 | count = 0; | ^~~~~
s620526024
p00008
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,n,num; while(cin >> n){ count = 0; for(a = 0;a <=9;a++){ for(b = 0;b <=9;b++){ for(c = 0;c <=9;c++){ for(d = 0;d <=9;d++){ if(a+b+c+d == n)num++; } } } } cout << count << endl; } }
a.cc: In function 'int main()': a.cc:7:5: error: 'count' was not declared in this scope 7 | count = 0; | ^~~~~
s821441316
p00008
C++
#include <cstdio> #include <cstdlib> int main(){ int n; int ans = 0; while(true){ n = null; scanf("%d\n",&n); if(n == null) break; ans = 0; for(int a = 9;a >= 0;a--){ for(int b = 9;b >= 0;b--){ for(int c = 9;c >= 0;c--){ for(int d = 9;d >= 0;d--){ if(a+b+c+d == n){ans++; break;} if(a+b+c+d < n) break; } } } } printf("%d\n",ans); } }
a.cc: In function 'int main()': a.cc:8:6: error: 'null' was not declared in this scope 8 | n = null; | ^~~~
s556517385
p00008
C++
#include "stdafx.h" #include <iostream> #include <sstream> #include <vector> #include <algorithm> #include <string> #include <functional> #include <numeric> #include <ctype.h> #include <cstdlib> #include <string.h> #include <cmath> #include <cstdio> using namespace std; int main() { int count = 0, num; while (cin >> num) { count = 0; for (int a = 0; a < 10; a++) { for (int b = 0; b < 10; b++) { for (int c = 0; c < 10; c++) { for (int d = 0; d < 10; d++) { if (a + b + c + d == num) count++; } } } } cout << count << endl; } }
a.cc:1:10: fatal error: stdafx.h: No such file or directory 1 | #include "stdafx.h" | ^~~~~~~~~~ compilation terminated.
s226147947
p00008
C++
#include<iostream> using namespace std; int main(){ int n, i, j, k, l, C = 0; while (cin >> n;){ for (i = 1; i < 10; i++){ for (j = 1; j < 10; j++){ for (k = 1; k < 10; k++){ for (l = 1; l < 10; l++){ if (n == i + j + k + l){ C = C++; } } } } } } cout << C << endl; return 0; }
a.cc: In function 'int main()': a.cc:5:24: error: expected ')' before ';' token 5 | while (cin >> n;){ | ~ ^ | ) a.cc:5:25: error: expected primary-expression before ')' token 5 | while (cin >> n;){ | ^
s073727064
p00008
C++
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 #include<iostream> using namespace std; #define RENT 100000 int main(){ int n; while(cin>>n){ int ans=0; for(int a=0;a<10;a++){ for(int b=0;b<10;b++){ for(int c=0;c<10;c++){ for(int d=0;d<10;d++){ if(a+b+c+d==n)ans++; } } } } cout<<ans<<endl; } }
a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 1 | ^ 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:22: /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
s010560250
p00008
C++
int main(){ int e; int f=0; while(std::cin>>e){ for(int a=0;a<10;a++){ for(int b=0;b<10;b++){ for(int c=0;c<10;c++){ for(int d=0;d<10;d++){ if(a+b+c+d==e){ f++; } } } } } std::cout<<f<<std::endl; } return 0; }
a.cc: In function 'int main()': a.cc:5:20: error: 'cin' is not a member of 'std' 5 | while(std::cin>>e){ | ^~~ a.cc:1:1: note: 'std::cin' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' +++ |+#include <iostream> 1 | int main(){ a.cc:17:22: error: 'cout' is not a member of 'std' 17 | std::cout<<f<<std::endl; | ^~~~ a.cc:17:22: note: 'std::cout' is defined in header '<iostream>'; this is probably fixable by adding '#include <iostream>' a.cc:17:36: error: 'endl' is not a member of 'std' 17 | std::cout<<f<<std::endl; | ^~~~ a.cc:1:1: note: 'std::endl' is defined in header '<ostream>'; this is probably fixable by adding '#include <ostream>' +++ |+#include <ostream> 1 | int main(){
s593311987
p00008
C++
include <stdio.h> int main(){ printf("4\n4\n"); }
a.cc:1:1: error: 'include' does not name a type 1 | include <stdio.h> | ^~~~~~~
s139579875
p00008
C++
#include<iostream> using namespace std; int main(){ while(cin >> N){ int N,count=0; for(int a=0;a<=9;a++){ for(int b=0;b<=9;b++){ for(int c=0;c<=9;c++){ for(int d=0;d<=9;d++){ if(N == (a+b+c+d)){ count ++; } } } } } cout << count << endl; } return 0; }
a.cc: In function 'int main()': a.cc:4:22: error: 'N' was not declared in this scope 4 | while(cin >> N){ | ^
s806044924
p00008
C++
#include <iostream> using namespace std; int solve(){ int ans = 0; for(int i = 0; i <= 9; ++i){ for(int j = 0; j <= 9; ++j){ for(int k = 0; k <= 9; ++k){ for(int l = 0; l <= 9; ++l){ int tmp = i + j + k + l; if(tmp == N) ans++; } } } } return ans; } int main(){ int N; while(cin >> N){ int ans = solve(); cout << ans << endl; } }
a.cc: In function 'int solve()': a.cc:11:31: error: 'N' was not declared in this scope 11 | if(tmp == N) ans++; | ^
s083000104
p00008
C++
#include <cstdio> #include<iostream> #include<algorithm> int main() { int n, cnt, i, j, k, l; while(cin >> n) { cnt = 0; for(i=0; i<=9; i++) for(j=0; j<=9; j++) for(k=0; k<=9; k++) for(l=0; l<=9; l++) if(i + j + k + l == n) cnt++; cout << cnt << endl; } return 0; }
a.cc: In function 'int main()': a.cc:9:11: error: 'cin' was not declared in this scope; did you mean 'std::cin'? 9 | while(cin >> n) { | ^~~ | std::cin In file included from a.cc:2: /usr/include/c++/14/iostream:62:18: note: 'std::cin' declared here 62 | extern istream cin; ///< Linked to standard input | ^~~ a.cc:18:7: error: 'cout' was not declared in this scope; did you mean 'std::cout'? 18 | cout << cnt << 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:18:22: error: 'endl' was not declared in this scope; did you mean 'std::endl'? 18 | cout << cnt << 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) | ^~~~
s649707636
p00008
C++
import java.util.Scanner; public class Main { public static void main(String[] args){ int count=0; int a=0; Scanner sc = new Scanner(System.in); // int n = sc.nextInt(); for (int i = 0;i<=9;i++) { int n = sc.nextInt(); for(int j = 0;j<=9;j++) { for(int k =0;k<=9;k++) { for(int l = 0;l<=9;l++) { a = i + j + k + l; if(a==n) count++; } } } } System.out.println(count); } }
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:2:1: error: expected unqualified-id before 'public' 2 | public class Main { | ^~~~~~
s986967529
p00008
C++
#include<iostream> #include<cmath> using namespace std; int main() { int n,a,b,cnt=0; cin >> n; for(a=0;a<=18;a++){ for(b=0;b<=18;b++){ if(a+b==i) cnt+= (10-abs(a-9)) * (10-abs(b-9)); } } cout << cnt << endl; return 0; }
a.cc: In function 'int main()': a.cc:11:33: error: 'i' was not declared in this scope 11 | if(a+b==i) cnt+= (10-abs(a-9)) * (10-abs(b-9)); | ^
s560006728
p00008
C++
import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}}
a.cc:1:1: error: 'import' does not name a type 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~ a.cc:1:1: note: C++20 'import' only available with '-fmodules-ts' a.cc:1:37: error: expected ':' before 'static' 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~~ | : a.cc:1:55: error: 'String' has not been declared 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~ a.cc:1:63: error: expected ',' or '...' before 'a' 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^ a.cc:1:84: error: expected ':' before 'Main' 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~ | : a.cc:1:212: error: 'Map' does not name a type 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~ a.cc:1:376: error: expected ';' after class definition 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^ | ; a.cc: In constructor 'Main::Main()': a.cc:1:103: error: 'Scanner' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~~ a.cc:1:136: error: 's' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^ a.cc:1:150: error: 'Object' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~ a.cc:1:178: error: 'System' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~~~ a.cc:1:197: error: 'i' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^ a.cc:1:200: error: 'null' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~ a.cc: In member function 'void Main::f(int, int)': a.cc:1:322: error: 'm' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^ a.cc:1:340: error: 'null' was not declared in this scope 1 | import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}} | ^~~~
s822565503
p00008
C++
#include<iostream> using namespace std;int main(){for(int i,c,k,n,j;cin>>n;k=0){i=0;i<1e4;i++,c=0){for(j=i;j>0;j/=10)c+=j%10;if(c==n)k++;}cout<<k<<endl;}}
a.cc: In function 'int main()': a.cc:2:79: error: expected ';' before ')' token 2 | using namespace std;int main(){for(int i,c,k,n,j;cin>>n;k=0){i=0;i<1e4;i++,c=0){for(j=i;j>0;j/=10)c+=j%10;if(c==n)k++;}cout<<k<<endl;}} | ^ | ;
s525882855
p00008
C++
#include <iostream> using namespace std; bool calc(int a, int b, int n) { n -= a-b; for (int c=0; c<10; c++) { for (int d=0; d<10; d++) { if (n == c+d) return true; } } return false; } void solve(int n) { int count = 0; for (int a=0; a<10; a++) { for (int b=0; b<10; b++) { if (calc(a,b,n)) cout++; } } cout << count << endl; } int main() { int n; while (cin >> n) { solve(n); } return 0; }
a.cc: In function 'void solve(int)': a.cc:19:46: error: no 'operator++(int)' declared for postfix '++' [-fpermissive] 19 | if (calc(a,b,n)) cout++; | ~~~~^~
s212149968
p00008
C++
#include <iostream> using namespace std; int calc(int a, int b, int n) { int tmp = n-a-b; int count = 0; for (int c=0; c<10; c++) { for (int d=0; d<10; d++) { if (tmp == c+d) count++; } } return count; } void solve(int n) { int count = 0; for (int a=0; a<10; a++) { for (int b=0; b<10; b++) { count += calc(a,b,n) } } cout << count << endl; } int main() { int n; while (cin >> n) { solve(n); } return 0; }
a.cc: In function 'void solve(int)': a.cc:21:45: error: expected ';' before '}' token 21 | count += calc(a,b,n) | ^ | ; 22 | } | ~
s822671055
p00008
C++
#include<cstdio> int solve(int a,int b){ if(a==0){ if(0<=b&&b<=9)return 1; else return 0; } int res=0; for(int i=0;i<10;i++){ res+=solve(a-1,b-i); } return res; } int main(){ int a; while(~scanf("%d",&a);) printf("%d\n",solve(3,a)); return 0; }
a.cc: In function 'int main()': a.cc:17:30: error: expected ')' before ';' token 17 | while(~scanf("%d",&a);) printf("%d\n",solve(3,a)); | ~ ^ | ) a.cc:17:31: error: expected primary-expression before ')' token 17 | while(~scanf("%d",&a);) printf("%d\n",solve(3,a)); | ^
s495486622
p00008
C++
#include <stdio.h> #include <stdlib.h> int main(void) { int n; char buf[256]; while (fgets(buf, 256, stdin){ n = atoi(buf); ans = 0; for (int i = 0; i < 10; i++){ for (int j = 0; j < 10; j++){ for (int k = 0; k < 10; k++){ for (int l = 0; l < 10; l++){ if (i + j + k + l == n){ ans++; } } } } } printf("%d\n", ans); } return (0); }
a.cc: In function 'int main()': a.cc:10:38: error: expected ')' before '{' token 10 | while (fgets(buf, 256, stdin){ | ~ ^ | ) a.cc:13:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | ans = 0; | ^~~ | abs
s418192208
p00008
C++
#include <stdio.h> #include <stdlib.h> int main(void) { int n; char buf[256]; while (fgets(buf, 256, stdin) != NULL){ n = atoi(buf); ans = 0; for (int i = 0; i < 10; i++){ for (int j = 0; j < 10; j++){ for (int k = 0; k < 10; k++){ for (int l = 0; l < 10; l++){ if (i + j + k + l == n){ ans++; } } } } } printf("%d\n", ans); } return (0); }
a.cc: In function 'int main()': a.cc:13:17: error: 'ans' was not declared in this scope; did you mean 'abs'? 13 | ans = 0; | ^~~ | abs
s123174417
p00008
C++
#inlcude<cstdio> int solve(int a,int b){ if(b==4){ if(a==0) return 1; else return 0; } else{ int res=0; for(int i=0;i<=a&&i<10;i++){ res+=solve(a-i,b+1); } return res; } } int main(){ int n; while(~scanf("%d",&n)){ printf("%d\n",solve(n,0)); } return 0; }
a.cc:1:2: error: invalid preprocessing directive #inlcude; did you mean #include? 1 | #inlcude<cstdio> | ^~~~~~~ | include a.cc: In function 'int main()': a.cc:20:9: error: 'scanf' was not declared in this scope 20 | while(~scanf("%d",&n)){ | ^~~~~ a.cc:21:3: error: 'printf' was not declared in this scope 21 | printf("%d\n",solve(n,0)); | ^~~~~~ a.cc:1:1: note: 'printf' is defined in header '<cstdio>'; this is probably fixable by adding '#include <cstdio>' +++ |+#include <cstdio> 1 | #inlcude<cstdio>
s602625885
p00008
C++
#include<iostream> using namespace std; int main(){ int n; int num=0; while(cin>>a){ for(int h=0;h<=9;h++){ for(int i=0;i<=9;i++){ for(int j=0;j<=9;j++){ for(int k=0;k<=9;k++){ if(h+i+j+k==a){num++;} } } } } cout<<num<<endl; num=0; } }
a.cc: In function 'int main()': a.cc:6:12: error: 'a' was not declared in this scope 6 | while(cin>>a){ | ^
s686477758
p00008
C++
#include <iostream> using namespace std; int main(){ int n; while(~scanf("%d",&n)){ int res = 0; for(int a=0;a<=9;a++) for(int b=0;b<=9;b++) for(int c=0;c<=9;c++) for(int d=0;d<=9;d++) if(a+b+c+d == n) res++; } printf("%d\n",res); }
a.cc: In function 'int main()': a.cc:15:15: error: 'res' was not declared in this scope 15 | printf("%d\n",res); | ^~~
s875302457
p00008
C++
#include<iostream> using namespace std; int main() { int n; while(cin>>n){ int res=0; for(int n1=0;n1<=9;n1++) for(int n2=0;n2<=9;n2++) for(int n3=0;n3<=9;n3++) for(int n4=0;n4<=9;n4++) if(n1+n2+n3+n4==n) res++ cout<<res<<endl; } }
a.cc: In function 'int main()': a.cc:13:25: error: expected ';' before 'cout' 13 | if(n1+n2+n3+n4==n) res++ | ^ | ; 14 | cout<<res<<endl; | ~~~~
s082198155
p00008
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,n,C; while(cin>>n){ C=0; a=0; b=0; c=0; d=0; for(int i=0;i<9;i++){ for(int j=0;j<10;j++){ for(int k=0;k<10;k++){ for(int l=0;l<10;l++){ if(a+b+c+d=n)C++; l++;} k++;} j++;} i++;} cout<<C;} }
a.cc: In function 'int main()': a.cc:15:9: error: lvalue required as left operand of assignment 15 | if(a+b+c+d=n)C++; | ~~~~~^~
s710666287
p00008
C++
#include<iostream> using namespace std; int main(){ int a,b,c,d,n,C; while(cin>>n){ C=0; a=0; b=0; c=0; d=0; for(int i=0;i<9;i++){ for(int j=0;j<10;j++){ for(int k=0;k<10;k++){ for(int l=0;l<10;l++){ if(a+b+c+d=n)C++; d++;} c++;} b++;} a++;} cout<<C;} }
a.cc: In function 'int main()': a.cc:15:9: error: lvalue required as left operand of assignment 15 | if(a+b+c+d=n)C++; | ~~~~~^~
s726532518
p00008
C++
#include <iostream> using namespace std; #define f(i) for(int i=0; i<10; ++i) //0008 int main(){ int x; while(cin >> x){ int a,b,c,d; int cout=0; f(a)f(b)f(c)f(d){ if(a+b+c+d == x){ ++count; } } cout << cout <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:17:35: error: 'count' was not declared in this scope; did you mean 'cout'? 17 | ++count; | ^~~~~ | cout a.cc:20:30: error: invalid operands of types 'int' and '<unresolved overloaded function type>' to binary 'operator<<' 20 | cout << cout <<endl; | ~~~~~~~~~~~~~^~~~~~
s820228056
p00008
C++
#include<cstdio> #include<algorithm> using namespace std; int DP[10][100]; int N; int main() { while(scanf("%d",&N)!=EOF) { memset(DP,0,sizeof(DP)); DP[0][0]=1; for(int i= 0;i<=4;i++) { for(int j=0;j<=N;j++) { for(int k=0;k<10;k++) { DP[i+1][j+k]+=DP[i][j]; } } } printf("%d\n",DP[4][N]); } }
a.cc: In function 'int main()': a.cc:12:17: error: 'memset' was not declared in this scope 12 | memset(DP,0,sizeof(DP)); | ^~~~~~ a.cc:3:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 2 | #include<algorithm> +++ |+#include <cstring> 3 | using namespace std;
s327020962
p00008
C++
#include<cstdio> #include<algorithm> #include<memory> #include<string> using namespace std; int DP[10][100]; int N; int main() { while(scanf("%d",&N)!=EOF) { memset(DP,0,sizeof(DP)); DP[0][0]=1; for(int i= 0;i<=4;i++) { for(int j=0;j<=N;j++) { for(int k=0;k<10;k++) { DP[i+1][j+k]+=DP[i][j]; } } } printf("%d\n",DP[4][N]); }    return 0; }
a.cc:28:1: error: extended character   is not valid in an identifier 28 |    return 0; | ^ a.cc:28:1: error: extended character   is not valid in an identifier a.cc:28:1: error: extended character   is not valid in an identifier a.cc: In function 'int main()': a.cc:14:17: error: 'memset' was not declared in this scope 14 | memset(DP,0,sizeof(DP)); | ^~~~~~ a.cc:5:1: note: 'memset' is defined in header '<cstring>'; this is probably fixable by adding '#include <cstring>' 4 | #include<string> +++ |+#include <cstring> 5 | using namespace std; a.cc:28:1: error: '\U00003000\U00003000\U00003000return' was not declared in this scope 28 |    return 0; | ^~~~~~~~~~~~
s155448376
p00008
C++
include <iostream> using namespace std; int main() { int n,count; int a,b, c,d; while(cin >> n){ //a>=b>=c>=dと仮定 count = 0; for( a = 0; a < 10; a++ ) { if ( a > n ) continue; for( b = 0; b < a+1; b++ ) { if( a + b > n ) continue; for( c = 0; c < b+1; c++ ) { if( a + b + c > n ) continue; d = n - a - b- c; if( d > c ) continue; if( a == d )//全部同じ count += 1; else if( a == c || b == d)//1つ異なる count += 4; else if( a == b && c == d )//2つずつ同じ count += 6; else if( a == b || b == c || c == d )//2つ同じ count += 12; else count += 24; } } } cout << count << endl; } return 0; }
a.cc:1:1: error: 'include' does not name a type 1 | include <iostream> | ^~~~~~~ a.cc: In function 'int main()': a.cc:11:15: error: 'cin' was not declared in this scope 11 | while(cin >> n){ | ^~~ a.cc:40:17: error: 'cout' was not declared in this scope; did you mean 'count'? 40 | cout << count << endl; | ^~~~ | count a.cc:40:34: error: 'endl' was not declared in this scope 40 | cout << count << endl; | ^~~~
s670316104
p00008
C++
#include <iostream> #include <cstdio> using namespace std; int main() { int n, count; while(1) { count=0; scanf("%d", &n); for(int i=0;i<10;i++) { for(int j=0;j<10;j++) { for(int k=0;k<10;k++) { if(a+b+c>=n-9 && a+b+c<=n)count++; } } } printf("%d\n", count); } }
a.cc: In function 'int main()': a.cc:14:16: error: 'a' was not declared in this scope 14 | if(a+b+c>=n-9 && a+b+c<=n)count++; | ^ a.cc:14:18: error: 'b' was not declared in this scope 14 | if(a+b+c>=n-9 && a+b+c<=n)count++; | ^ a.cc:14:20: error: 'c' was not declared in this scope 14 | if(a+b+c>=n-9 && a+b+c<=n)count++; | ^
s004395544
p00008
C++
9#include<iostream> using namespace std; int main(void) { int e=0,n=0; while(cin >> n){ for(int a =0;a < 10;++a){ for(int b= 0;b < 10;++b){ for(int c= 0;c < 10 ; ++c){ for(int d=0 ;d < 10;++d){ if(a+b+c+d == n){ e +=1; } } } } } cout << e << endl; e = 0; } }
a.cc:1:2: error: stray '#' in program 1 | 9#include<iostream> | ^ a.cc:1:1: error: expected unqualified-id before numeric constant 1 | 9#include<iostream> | ^ a.cc: In function 'int main()': a.cc:7:9: error: 'cin' was not declared in this scope 7 | while(cin >> n){ | ^~~ a.cc:19:3: error: 'cout' was not declared in this scope 19 | cout << e << endl; | ^~~~ a.cc:19:16: error: 'endl' was not declared in this scope 19 | cout << e << endl; | ^~~~
s866604388
p00008
C++
#include <iostream> using namespace std; int main() { int n; while (cin >> n) { int combo = 0; for (int a = 0; a < 10; ++a) { for (int b = 0; b < 10; ++b) { for (int c = 0; c < 10; ++c) { for (int d = 0; d < 10; ++d) { if (a + b + c + d == n) { ++combo } }}}} cout << combo <<endl; } return 0; }
a.cc: In function 'int main()': a.cc:19:24: error: expected ';' before '}' token 19 | ++combo | ^ | ; 20 | } | ~
s754901098
p00008
C++
#include<iostream> using namespace std; int main() { int n; while (cin>>n) { int combo = 0; for (int a=0;a<10;++a) { for (int b=0;b<10;++b) { for (int c=0;c<10;++c) { for (int d=0;d<10;++d) { if(a+b+c+d==n) ++combo; } } } } cout<<combo<<endl; } return 0; cin.get(); getch(); }
a.cc: In function 'int main()': a.cc:27:9: error: 'getch' was not declared in this scope; did you mean 'getc'? 27 | getch(); | ^~~~~ | getc
s503028637
p00008
C++
#include<iostream> #include <conio.h> using namespace std; int main() { int n; while (cin>>n) { int combo = 0; for (int a=0;a<10;++a) { for (int b=0;b<10;++b) { for (int c=0;c<10;++c) { for (int d=0;d<10;++d) { if(a+b+c+d==n) ++combo; } } } } cout<<combo<<endl; } return 0; cin.get(); getch(); }
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s131846383
p00008
C++
#include<iostream> #include <conio.h> using namespace std; int main() { int n; while (cin>>n) { int combo = 0; for (int a=0;a<10;++a) { for (int b=0;b<10;++b) { for (int c=0;c<10;++c) { for (int d=0;d<10;++d) { if(a+b+c+d==n) ++combo; } } } } cout<<combo<<endl; } return 0; cin.get(); getch(); }
a.cc:2:10: fatal error: conio.h: No such file or directory 2 | #include <conio.h> | ^~~~~~~~~ compilation terminated.
s904039090
p00008
C++
#include <iostream> #include <iomanip> #include <string> #include <cstdlib> #include <math.h> #include <algorithm> using namespace std; int main() { int n; int count; while(cin>>n) { for ( int a=0;a<=9;a++) for ( int b=0;b<=9;b++) for ( int c=0;c<=9;c++) for ( int d=0;d,=9;d++) if (a +b+c+d == n) count++; } cout<<count; return 0; }
a.cc: In function 'int main()': a.cc:19:37: error: expected primary-expression before '=' token 19 | for ( int d=0;d,=9;d++) | ^
s028749420
p00008
C++
#include <iostream> #include <iomanip> #include <string> #include <cstdlib> #include <math.h> #include <algorithm> using namespace std; int main() { int n; int count; while(cin>>n) { for ( int a=0;a<=9;a++) for ( int b=0;b<=9;b++) for ( int c=0;c<=9;c++) for ( int d=0;d,=9;d++) if (a +b+c+d == n) count++; } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:19:37: error: expected primary-expression before '=' token 19 | for ( int d=0;d,=9;d++) | ^
s781522722
p00008
C++
#include <iostream> using namespace std; int main() { int n; int count=0; while(cin>>n) { for ( int a=0;a<=9;a++) for ( int b=0;b<=9;b++) for ( int c=0;c<=9;c++) for ( int d=0;d,=9;d++) if (a +b+c+d == n) count++; } cout<<count<<endl; return 0; }
a.cc: In function 'int main()': a.cc:15:37: error: expected primary-expression before '=' token 15 | for ( int d=0;d,=9;d++) | ^
s259695012
p00008
C++
#include<iostream> using namespace std; int main(void){ int dp[50][4]; for(int i = 0; i < 50; i++){ for(int j = 0; i < 4; j++){ if(i < 10 && j = 0) dp[i][j] = 1; else dp[i][j] = 0; } } for(int i = 1; i < 4; i++){ for(int j = 0; j < 10; j++){ for(int k = 0; k < 36; k++){ if(k - j >= 0){ dp[k][i] += dp[k - j][i - 1]; } } } } int n; while(cin >> n){ cout << dp[n][3] << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:17: error: lvalue required as left operand of assignment 8 | if(i < 10 && j = 0) | ~~~~~~~^~~~
s650094117
p00008
C++
#include<iostream> using namespace std; int main(void){ int c; while(cin >> c){ int cnt = 0; for(i = 0; i < 10; i++) for(j = 0; j < 10; j++) for(k = 0; k < 10; k++) for(l = 0; l < 10; l++) if(i * j * k * l == n) cnt++; cout << cnt << endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:9: error: 'i' was not declared in this scope 8 | for(i = 0; i < 10; i++) | ^ a.cc:9:11: error: 'j' was not declared in this scope 9 | for(j = 0; j < 10; j++) | ^ a.cc:10:13: error: 'k' was not declared in this scope 10 | for(k = 0; k < 10; k++) | ^ a.cc:11:15: error: 'l' was not declared in this scope 11 | for(l = 0; l < 10; l++) | ^ a.cc:12:33: error: 'n' was not declared in this scope 12 | if(i * j * k * l == n) | ^
s295055663
p00008
C++
#include<iosteram> using namespace std; int main(){ int n,ans; while(cin>>n){ ans=0; for(i=0;i<10;i++){ for(j=0;j<10;j++){ for(k=0;k<10;k++){ for(l=0;l<10;l++){ if(i+j+k+l==n){ans++;}}}}}cout<<ans<<endl;}}
a.cc:1:9: fatal error: iosteram: No such file or directory 1 | #include<iosteram> | ^~~~~~~~~~ compilation terminated.
s157886953
p00008
C++
#include <iostream> #include <string> using namespace std; int main(){ int a[5][51]; int b; int c; int d; b=1; while(b<5){ c=0; while(c<51){ a[b][c]=0; c=c+1;} b=b+1;} b=0; while(b<10){ a[1][b]=1; b=b+1;} b=2; while(b<5){ c=0; while(c<51){ d=0; while(d<9){ if(c>=d){a[b][c]=a[b][c]+a[b-1][c-d];} d=d+1;} c=c+1:} b=b+1;} int n; while(cin >> n){ cout << a[4][n] << endl;} }
a.cc: In function 'int main()': a.cc:31:6: error: expected ';' before ':' token 31 | c=c+1:} | ^ | ;
s260800705
p00008
C++
#include <iostream> void main() { int n; while( std::cin >> n ) { int num = 0; for( int i1=0; i1<=9; ++i1 ) { for( int i2=0; i2<=9; ++i2 ) { for( int i3=0; i3<=9; ++i3 ) { for( int i4=0; i4<=9; ++i4 ) { num += i1+i2+i3+i4 == n; } } } } std::cout << num; } }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~
s038400486
p00008
C++
#include <iostream> void main() { int n; while( std::cin >> n ) { int num = 0; for( int i1=0; i1<=9; ++i1 ) { for( int i2=0; i2<=9; ++i2 ) { for( int i3=0; i3<=9; ++i3 ) { for( int i4=0; i4<=9; ++i4 ) { num += (i1+i2+i3+i4 == n); } } } } std::cout << num; } }
a.cc:3:1: error: '::main' must return 'int' 3 | void main() | ^~~~
s343530854
p00008
C++
#include <iostream> using namespace std; int h[51]; int main() { int a,b,c,d,n,j=0,m; for (m=0; m<10000; m++) { a=m/1000; b=(m-a*1000)/100; c=(m-a*1000-b*100)/10; d=m-a*1000-b*100-c*10; h[a+b+c+d]++; } while(cin >> n) cout << h[n] << endl; return 0;
a.cc: In function 'int main()': a.cc:12:11: error: expected '}' at end of input 12 | return 0; | ^ a.cc:4:12: note: to match this '{' 4 | int main() { | ^
s125401578
p00008
C++
#include <iostream> using namespace std; int main(){ int n; while(cin >> n){ int a = 0, b = 0, c = 0, d = 0, m = 0; for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ for(int k = 0; k < 10; k++){ for(int l = 0; l < 10; l++){ if(i+j+k+l == n) m++; } } } } } cout << m << endl; return 0; }
a.cc: In function 'int main()': a.cc:19:11: error: 'm' was not declared in this scope 19 | cout << m << endl; | ^
s759173293
p00008
C++
#include <iostream> #include<cstdio> using namespace std; int main(){ int n; while(cin >> n){ int a = 0, b = 0, c = 0, d = 0, m = 0; for(int i = 0; i < 10; i++){ for(int j = 0; j < 10; j++){ for(int k = 0; k < 10; k++){ for(int l = 0; l < 10; l++){ if(i+j+k+l == n) m++; } } } } } cout << m << endl; return 0; }
a.cc: In function 'int main()': a.cc:20:11: error: 'm' was not declared in this scope 20 | cout << m << endl; | ^
s298519931
p00008
C++
#include <iostream> using namespace std; int main(void){ int n,a[4],count; while(cin >> n){ count=0; for(a[0]=0;a[0]<10;a[0]++) for(a[1]=0;a[1]<10;a[1]++) for(a[2]=0;a[2]<10;a[2]++) for(a[3]=0;a[3]<10;a[3]++) if(a[0]+a[1]+a[2]+a[3]==n){ count++ break; } cout << count << endl; } return 0; }
a.cc: In function 'int main()': a.cc:15:64: error: expected ';' before 'break' 15 | count++ | ^ | ; 16 | break; | ~~~~~
s833203334
p00008
C++
#include<iostream> using namespace std; int main() { long nn[]={1,4,10,20,35,56,84,120,165,220,282,348,415,480,540,592,633,660,670, 660,633,592,540,480,415,348,282,220,165,120,84,56,35,20,10,4,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; for(;;){ cin>>n; if(cin.eof())break; cout<<nn[n]<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:8:6: error: 'n' was not declared in this scope; did you mean 'nn'? 8 | cin>>n; | ^ | nn
s899027786
p00008
C++
#include<iostream> using namespace std; int main() { int x,y; while(cin>>x) { for(int a=0; a<=9; a++) { for(int b=0; b<=9; b+=) { for(int c=0; c<=9; c++) { for(int d=0; d<=9; d++) { if(a+b+c+d==0) y++; }}}} cout<<y<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:29: error: expected primary-expression before ')' token 11 | for(int b=0; b<=9; b+=) | ^
s378546975
p00008
C++
#include<iostream> using namespace std; int main() { int x,y; while(cin>>x) { for(int a=0; a<=9; a++) { for(int b=0; b<=9; b+=) { for(int c=0; c<=9; c++) { for(int d=0; d<=9; d++) { if(a+b+c+d=0) y++; }}}} cout<<y<<endl; } return 0; }
a.cc: In function 'int main()': a.cc:11:29: error: expected primary-expression before ')' token 11 | for(int b=0; b<=9; b+=) | ^ a.cc:17:28: error: lvalue required as left operand of assignment 17 | if(a+b+c+d=0) y++; | ~~~~~^~
s511000255
p00008
C++
#include<iostream> using namespace std; int main() { int num; cin >> num; while(cin>>num){ int answer = 0; for(int a = 0;a != 10;++a){ for(int b = 0;b != 10;++b){ for(int c = 0;c != 10;++c){ for(int d = 0;d != 10;++d) if(a+b+c+d==num) answer++; } } } } cout <<answer<<endl; return 0; }
a.cc: In function 'int main()': a.cc:22:16: error: 'answer' was not declared in this scope 22 | cout <<answer<<endl; | ^~~~~~
s112963379
p00008
C++
#include <stdio.h> int main(void){ int n; while(scanf("%d",&n)!=EOF){ int count=0; for(int a=9;a>=0;a--){ for(int b=9;b>=0;b--){ for(int c=9;c>=0;c--){ for(int d=9;d>=0;d--){ if(a+b+c+d==n){ count++; } } } } } } printf("%d\n",count); return 0; }
a.cc: In function 'int main()': a.cc:18:15: error: 'count' was not declared in this scope 18 | printf("%d\n",count); | ^~~~~
s671600944
p00008
C++
#include <iostream> #include <cstring> using namespace std; int ans[51]; void rec(int sum, int d){ if(d == 4){ ans[sum]++; return; } for(int i = 0 ; i <10; i++){ rec(sum+i,d+1); } } void init(){ memset(ans,0,sizeof(ans)); rec(0,0); } int main(){ int n; init(); while(cin >> n){ cout << ans[n] << endl; } return 0; } #include <iostream> #include <cstring> using namespace std; int ans[51]; void rec(int sum, int d){ if(d == 4){ ans[sum]++; return; } for(int i = 0 ; i <10; i++){ rec(sum+i,d+1); } } void init(){ memset(ans,0,sizeof(ans)); rec(0,0); } int main(){ int n; init(); while(cin >> n){ cout << ans[n] << endl; } return 0; }
a.cc:29:5: error: redefinition of 'int ans [51]' 29 | int ans[51]; | ^~~ a.cc:4:5: note: 'int ans [51]' previously declared here 4 | int ans[51]; | ^~~ a.cc:30:6: error: redefinition of 'void rec(int, int)' 30 | void rec(int sum, int d){ | ^~~ a.cc:5:6: note: 'void rec(int, int)' previously defined here 5 | void rec(int sum, int d){ | ^~~ a.cc:39:6: error: redefinition of 'void init()' 39 | void init(){ | ^~~~ a.cc:14:6: note: 'void init()' previously defined here 14 | void init(){ | ^~~~ a.cc:43:5: error: redefinition of 'int main()' 43 | int main(){ | ^~~~ a.cc:18:5: note: 'int main()' previously defined here 18 | int main(){ | ^~~~
s537850364
p00008
C++
#include<iostream> #include<cstdio> using namespace std; int main() { int n; while(scanf("%d,"&n)){ int ans=0; for(int a=0;a<10;a++){ for(int b=0;b<10;b++){ for(int c=0;c<10;c++){ for(int d=0;d<10;d++){ if(a+b+c+d==n)ans++; } } } } printf("%d\n",ans); } return 0; }
a.cc: In function 'int main()': a.cc:7:18: error: invalid operands of types 'const char [4]' and 'int' to binary 'operator&' 7 | while(scanf("%d,"&n)){ | ~~~~~^~ | | | | | int | const char [4]
s243074214
p00008
C++
#include <stdio.h> int main( void ){ int nCount = 0; int n[]; while( true ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n ) nCount++; } } } } printf( "%d\n",nCount ); } return 0; }
a.cc: In function 'int main()': a.cc:5:9: error: storage size of 'n' isn't known 5 | int n[]; | ^
s009788822
p00008
C++
#include <stdio.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( &n[m] ); if(( n[m] = atoi(str)) == -1 ) break; m++; } for( int a = 0;i < m;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets( &n[m] ); | ^~~~ | getw a.cc:11:21: error: 'atoi' was not declared in this scope 11 | if(( n[m] = atoi(str)) == -1 ) break; | ^~~~ a.cc:14:20: error: 'i' was not declared in this scope 14 | for( int a = 0;i < m;a++ ){ | ^
s779706282
p00008
C++
#include <stdio.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( str ); if(( n[m] = atoi(str)) == -1 ) break; m++; } for( int a = 0;i < m;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); } return 0; }
a.cc: In function 'int main()': a.cc:10:9: error: 'gets' was not declared in this scope; did you mean 'getw'? 10 | gets( str ); | ^~~~ | getw a.cc:11:21: error: 'atoi' was not declared in this scope 11 | if(( n[m] = atoi(str)) == -1 ) break; | ^~~~ a.cc:14:20: error: 'i' was not declared in this scope 14 | for( int a = 0;i < m;a++ ){ | ^
s392641146
p00008
C++
#include <stdio.h> #include <Windows.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( str ); if(( n[m] = atoi(str)) == -1 ) break; m++; } for( int a = 0;a < m;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); } return 0; }
a.cc:2:10: fatal error: Windows.h: No such file or directory 2 | #include <Windows.h> | ^~~~~~~~~~~ compilation terminated.
s541140826
p00008
C++
#include <stdio.h> #include <Windows.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( str ); if(( n[m] = atoi(str)) == 0 ) break; m++; } for( int a = 0;a < m;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); } return 0; }
a.cc:2:10: fatal error: Windows.h: No such file or directory 2 | #include <Windows.h> | ^~~~~~~~~~~ compilation terminated.
s426866421
p00008
C++
#include <stdio.h> #include <Windows.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( str ); if(( n[m] = atoi(str)) == -1 ) break; m++; } for( int a = 0;a < m+1;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); nCount = 0; } return 0; }
a.cc:2:10: fatal error: Windows.h: No such file or directory 2 | #include <Windows.h> | ^~~~~~~~~~~ compilation terminated.
s814353630
p00008
C++
#include <stdio.h> #include <srdlib.h> #include <string.h> int main( void ){ int nCount = 0; int n[50]; int m = 0; char str[3]; while( true ){ gets( str ); if(( n[m] = atoi(str)) == 0 ) break; m++; } for( int a = 0;a < m+1;a++ ){ for( int i = 0;i < 10;i++ ){ for( int j = 0;j < 10;j++ ){ for( int k = 0;k < 10;k++ ){ for( int l = 0;l < 10;l++ ){ if( i+j+k+l == n[a] ) nCount++; } } } } printf( "%d\n",nCount ); nCount = 0; } return 0; }
a.cc:2:10: fatal error: srdlib.h: No such file or directory 2 | #include <srdlib.h> | ^~~~~~~~~~ compilation terminated.
s100671379
p00008
C++
#include<stdio.h> int main(void){ int n,ans=0; scanf_s("%d",&n); for(int a=0;a<10;a++){ for(int b=0;b<10;b++){ for(int c=0;c<10;c++){ for(int d=0;d<10;d++){ if(n==(a+b+c+d)) ans++; } } } } printf("%d",ans); 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",&n); | ^~~~~~~ | scanf
s941324558
p00008
C++
#include <cstdio.h> #include <algorithm> using namespace std; int main(void) { int i, j, k, h, n; int sum = 0; scanf("%d", &n); for (i = 0; i < 10; i++){ for (j = 0; j < 10; j++){ for (k = 0; k < 10; k++){ for (h = 0; h < 10; h++){ if (i + j + k + h == n){ sum++; } } } } } printf("%d\n", sum); return (0); }
a.cc:1:10: fatal error: cstdio.h: No such file or directory 1 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.