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 cou...
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: ...
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]++; } ...
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> ...
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]++; } } } ...
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> ...
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...
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++; } } } } } } cou...
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 | ...
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; | ...
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++; } ...
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 ...
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 fi...
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; } } } } ...
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 fi...
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++; } ...
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++; } ...
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; | ...
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...
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 na...
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 (i...
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: err...
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 =...
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...
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; ...
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; ...
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 ...
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) ...
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::...
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...
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::...
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...
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::...
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 + ...
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++; } } } } } co...
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;} ...
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; whi...
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; re...
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++)...
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...
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:...
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++; ...
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++) ...
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; ...
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(in...
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...
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>();v...
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++; ...
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++) { c...
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("...
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){ ...
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 | ...
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)...
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 ...
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 '<unresol...
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",...
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> +++ ...
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...
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 th...
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 ...
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'? ...
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:...
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;...
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...
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) { ...
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(); get...
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...
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...
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...
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...
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+...
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...
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 | f...
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...
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...
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++; } } } }...
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 << ...
a.cc: In function 'int main()': a.cc:15:64: error: expected ';' before 'break' 15 | count++ | ^ | ; 16 | ...
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++; }}...
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++; }}}...
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; ...
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 << ...
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)...
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++; } ...
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;...
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; | ...
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 ...
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; | ...
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++ ){ ...
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++ ){ ...
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++ ){ ...
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++ ){ ...
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++; } } } } } ...
a.cc:1:10: fatal error: cstdio.h: No such file or directory 1 | #include <cstdio.h> | ^~~~~~~~~~ compilation terminated.