Go: package main

import "fmt"

var count int

func main() {
	var inputNum, inputCount int
	var resultArr [50]int
	for {
		fmt.Scanf("%d", &inputNum)
		resultArr[inputCount] = calcA(inputNum)
		inputCount++
	}
	for _, value := range resultArr {
		fmt.Println(value)
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include <cstdio>

#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
#define FOR(i, m, n) for(int i = m;i < n;i++)

int main() {
  int n;
  while(scanf("%d",&n) != EOF) {
    int t = 0;
    REP(i,10) {
      if(i > n) break;
      REP(j,10) {
	if(i+j > n) break;
	REP(k,10) {
	  if(i+j+k > n) break;
	  REP(l,10) {
	    if(i+j+k+l > n) break;
	    else if(i+j+k+l == n) t += 1;
	  }
	}
      }
    }
    printf("%d\n", t);
  }

  return 0;
}

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

int main() {

  int n;
  while ( cin >> n ) {

    int 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;

  }

  return 0;

}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <cstring>
using namespace std;

#define FOR(i,a,b) for(long long int i=(a);i<(b);i++)
#define REP(i,n) for(long long int i=0;i<(n);i++)
#define ALL(s) (s).begin(),(s).end()

#define PI 3.14159265358479

typedef long long int ll;
typedef vector<long long int> vi;

int main(){
	ll n, c = 0;
	while (cin >> n){
		REP(i, 10){
			REP(j, 10){
				REP(k, 10){
					REP(l, 10){
						if (i + j + k + l == n)c++;
					}
				}
			}
		}
		cout << c << "\n";
		c = 0;
	}
}

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

int main(){
	int piyo,n=0;
	while(1){
		piyo=0;
		cin >> n;
		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(n == i+j+k+l){
							piyo++;
						}
					}
				}
			}
		}
		cout <<piyo<< endl;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,ans=0;
	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)ans++;
				}
			}
		}
	}
}

C++: #include <iostream>
#define rep(i,a) for(int i=0;i<a;++i)

using namespace std;

int main(void)
{
	int n;
	int a[4];
	while(cin >> n,n)
	{
		int count = 0;
		rep(i,10)
		{
			rep(j,10)
			{
				rep(c,10)
				{
					rep(d,10)
					{
						if(i+j+c+d == n)
							++count;
					}
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <numeric>
#include <cmath>
using namespace std;
typedef vector<int> VI;
#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )

int sumDigit(int n) {
    int ret = 0;

    while (n) {
        ret += n % 10;
        n /= 10;
    }
    return ret;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    VI nums;
    
    int t;
    while (cin >> t) {
        nums.push_back(t);
    }
    
    for (auto n : nums) {
        int ans = 0;
        REP(i, 0, 10000) {
            if (n == sumDigit(i))   ++ans;
        }
        cout << ans << endl;
    }
    
    return 0;
}

C++: #include<iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <math.h>
using namespace std;
int p,ans=0;
	int main(){
		while(cin>>p){
			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==p){ans++;}}}}}
		cout<<ans<<endl;
		ans=0;}
		return 0;}

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



int main(void){	

	int n,count=0;
	while (cin >> n){

		for (int i = 1; i < 10; i++){
			for (int j = 1; j < 10; j++){
				for (int k = 1; k < 10; k++){
					for (int l = 1; l < 10; l++){

						if (i + j + k + l == n){
							count++;
						}

					}
				}
			}
		}cout << count << endl;

	}
	
	return 0;
}

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

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;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,g,ans=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++){
					g=a+b+c+d;
					if(g==n)ans++;
				}
			}
		}
	}
	cout<<ans<<endl;
	ans=0;
	}
	return 0;
}

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

int main()
{
	int num;
	int i, j, s, t;
	
	while(cin >> num){
		int count = 0;
		
		for(i=0; i<=9; i++){
			for(j=0; j<=9; j++){
				for(s=0; s<=9; s++){
					for(t=0; t<=9; t++){
						if((i+j+s+t) == num){
							++count;
						}
					}
				}
			}
		}
		cout << count << endl;
	}
	
	return 0;
}

C++: #include<stdio.h>
int main()
{
  int i,j,k,l,cou,n;
  while(scanf("%d",&n)!=EOF){
    cou=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)cou++;
	  }
	}
      }
    }
  }
  printf("%d\n",cou);
  return 0;
}

C++: #include<iostream>
#include <stdio.h>
#include<vector>
using namespace std;
int dfs(int n, int level){
    //printf("%d %d\n", n, level);
    if(n<0) return 0;
    if (level == 0 && n<0) return 0;
    if(level == 0 && n == 0) return 1;
    if(level > 0){
        int sum = 0;
        for(int i=0; i<=9; i++){
            if(i<=n)
                sum += dfs(n-i, level-1);
        }
        return sum;
    }
    return 0;
}
int main(){
    int n;
    while(scanf("%d\n", &n)!=EOF){
        printf("%d\n", dfs(n, 4));
    }
}

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

int main(void){
     int n,i=0;
     cin >> n;
     while(!cin.eof()){
	  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){
				   i = i+1;
			      }
			 }
		    }
	       }
	  }
     }

     cout << i << endl;

     return 0;
}

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

int main(){
  int a,cou;
  while(cin>>a){
    cou=0;
    for(int i=0;i<10;i++){
      for(int j=0;j<10;j++){
	for(int k=0;k<10;k++){
	  for(int q=0;q<10;q++){
	    if(i+j+k+q==a)cou++;
	  }
	}
      }
    }
    cout<<cou<<endl;
  }
  return 0;
}

C++: #include <cstdio>
#include <iostream>

inline int counter(int n);

int main(){
	std::ios::sync_with_stdio(false);
	int data[50],n,i=0;
	while(std::cin){
		std::cin >> n;
		data[i] = counter(n);
		i++;
	}
	for (int j=0;j<i-1;j++){
		std::cout << data[j] << "\n";
	}
}

inline int counter(int n){
	int count=0;
	for (int i=0;i<10;++i){
		for (int j=0;j<10;++j){
			for (int l=0;l<10;++l){
				for (int t=0;t<10;++t){
					if (i+j+l+t == n){
						count++;
					}
				}
			}
		}
	}
	return count;
}

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

const int max_data = 4;
int x;
int n=0;
int ans;

void solve(int n, int x)
{
	if(x > max_data*9){
		return;
	}

	if(n == max_data && x==0){
		ans++;
		return;
	}else if(n == max_data){
		return;
	}

	for(int i=0;i<=9;i++){
		if(x-i >= 0){
			solve(n+1,x-i);
		}
	}
	return;
}

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

C++: #include <iostream>

int main(){
	int n,cnt;
	while(std::cin>>n){
		cnt=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) cnt++;
					}
				}
			}
		}
		std::cout<<cnt<<'\n';
	}
	return 0;
}