Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

C++: #include<cstdio>
#include<iostream>
#include<algorithm>
#include<vector>
#include<set>
#include<string>
#include<functional>
#include<queue>
#include<stack>
#include<math.h>
#define INF 999999

using namespace std;

typedef long long ll;

int main()
{
	int n;
	
	while (cin >> n) {
		int count = 0;
		for (int i = 0; i <= 9; i++) {
			for (int j = 0; j <= 9; j++) {
				for (int k = 0; k <= 9; k++) {
					if (n - 9 <= i + k + j&&i + k + j <= n)count++;
				}
			}
		}
		cout << count << endl;
	}

	return 0;
}

C++: #include <stdio.h>
#include <string.h>

int dp[51][5];

void init() {
  memset(dp, 0, sizeof(dp));
  dp[0][0] = 1;
  for (int i = 0; i <= 50; ++i) {
    for (int j = 1; j <= 4; ++j) {
      for (int t = 0; t < 10 && t <= i; ++t) {
        dp[i][j] += dp[i-t][j-1];
      }
    }
  }
}

int main() {
  //freopen("SumOf4Integers.in", "r", stdin);
  int n;
  init();
  while (scanf("%d", &n) == 1) {
    int result = dp[n][4];
    printf("%d\n", result);
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	int count = 0;
	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;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char const* argv[])
{
	int a,b,c,d,n;
	int succed;

	while( cin >> n ){
		succed = 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 ) succed++;
					}
				}
			}
		}
		cout << succed << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <cmath>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <stdio.h>

using namespace std;

int main()
{
	int n,ans;

	while(scanf("%d",&n)!=EOF){
		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;
	}

	return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
#define F(I,J,N) for(int I=J;I<N;I++)

int n,ans;

bool r(int p,int c){
	if(p<0) return false;
	if(n-p>c*9) return true;
	if(c==0){if(p==n)ans++;return true;}
	F(i,0,10){
		if(!r(p+i,c-1)) break;
	}
	return true;
}

int main(){
	while(cin>>n){
		ans=0;
		r(0,4);
		cout<<ans<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
	int num;
	int a,b,c,d,cnt=0;
	while(cin>>num, !cin.eof()){
		for(a=0; a<10; a++)
			for(b=0; b<10; b++)
				for(c=0; c<10; c++)
					for(d=0; d<10; d++)
						if(a+b+c+d==num) cnt++;
		cout<<cnt<<endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;

int main(){
  int n;
  while(cin >> n){
    int s = 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){
	      s++;
	    }
	   
	  }
	}
      }
    }
    cout<<s<<endl;

  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
	int n, ans;
	while (scanf("%d", &n) != EOF) {
		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;
	}
	cout << ans << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;

int main(){
	int n,ans;
	while(cin >> n){
		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(n == a + b + c + d)++ans;
					}
				}
			}
		}
		cout << ans << '\n';
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <fstream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <queue>
#include <stack>
#include <set>
#include <ctime>
#include <iterator>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
using namespace std;


int main()
{
    int n;
    while(cin>>n)
    {
        int res = 0;
        for(int c=0;c<=9;c++)
        {
            for(int c2=0;c2<=9;c2++)
            {
                for(int c3=0;c3<=9;c3++)
                {
                    int c4 = n - c3 -c2 - c;
                    if(c4 >= 0 && c4 <= 9)
                        res++;
                }
            }
        }
        cout<<res<<endl;
    }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;

int main(){
	int n, a = 0;

	while (cin >> n){
		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++;
					}
				}
			}
		}
		cout << a << endl;
	}

	return 0;
}

C++: #include <iostream>
using namespace std;

int countNum(int num) {
	int n = 0;
	for (int a = 0; a < 10 && a <= num ; a++) {
		if (num - a > 27)
			continue;
		for (int b = 0; b < 10 && b + a <= num ; b++) {
			if (num - b - a > 18)
				continue;
			for (int c = 0; c < 10 && c + b + a <= num ; c++) {
				if (num - b - a - c > 9)
					continue;
				n++;
			}
		}
	}
	return n;
}

int main() {
	int n = 0;
	cin >> n;
	cout << countNum(n) << endl;
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,a,b,c,d;
	int k,l,m,ans=0;
	cin>>n;
	for(a=0;a<=min(n,9);a++){
		k = n-a;
		for(b=0;b<=min(9,k);b++){
			l = k-b;
			for(c=0;c<=min(9,l);c++){
				m = l-c;
				if(0 <= m && m<10){
					ans++;
				}
			}
		}		
	}
	cout << ans << endl;
}

C++: #include <stdio.h>

int main(void)
{
  int n,i,a,b,c,d;

  i = 0;
  while(i < 50){
    int ans = 0;
    scanf("%d", &n);
    if(!(n > 0 && n <= 50)){
      break;
    }
    if(n <= 36){
      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){
		ans++;
	      }
	    }
	  }
	}
      }
    }
    printf("%d\n", ans);
    i++;
  }
  return 0;
}

C++: #include<iostream>

int main(void){
  int a,b,c,d,n;
  int i =0;
  std::cin >> n;
  if(n>50){
    return 0;
  }
  for(a=0;a<10;a++){
    for(b=0;b<10;b++){
      for(c=0;c<10;c++){
	for(d=0;d<10;d++){
	  if(n ==a+b+c+d){
	    i++;
	  }
	}
      }
    }
  }
  std::cout << i << std::endl;
}

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	int n;
	while(cin>>n){
		int 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)==n){
							count++;
						}
					}
				}
			}
		}
		cout<<count<<endl;
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
signed main(){
  int a,b;
  while(scanf("%d",&a)!=EOF){
    b=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==a) b++;
	  }
	}
      }
    }
    cout<<b<<"\n";
  }
}

C++: #include <stdio.h>

int main(void) {
	int a;
	while (scanf("%d", &a) != EOF) {
		int count = 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 (a == i + j + k + l) count++;
					}
				}
			}
		}
		printf("%d\n", count);
	}
	return 0;
}