Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

C++: #include<iostream>
int t[51],i,j,x,a,b;int main(){for(;i++<10000;t[x]++)for(j=x=0,b=i;j++<4;b/=10)x+=b%10;for(;!(std::cin>>a).eof();)printf("%d\n",t[a]);}

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

int main(){
	
	int n;
	int a, b, c, d;
	int combsum=0;

	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 )
							combsum++;

		cout << combsum << endl;
                combsum = 0;
	}
	return 0;
}

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

int main(){
  int a,b,c,d,n;
  int ans=0;
  while(scanf("%d",&n) != EOF){
    ans = 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(a+b+c+d == n)ans++;
	  }
	}
      }
    }
    cout<<ans<<endl;
  }
    return 0;
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
typedef long long int LLI;
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n;
  while(cin>>n){
    int co=0;
    rep(a,10)rep(b,10)rep(c,10)rep(d,10)if(a+b+c+d==n)co++;
    cout<<co<<endl;
  }
}

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

using namespace std;

int main(){
    int n;
    while(cin >> n){
        int a = 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++){
                        int x = i + j + k + l;
                        if(n==x){
                            a++;
                        }
                    }
                }
            }
        }
        cout << a << endl;
    }
}

C++: #include<iostream>
#include<string>
#include<algorithm>
using namespace std;
main(){
	int n;
	while(cin>>n){
		int sum=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)++sum;
		cout<<sum<<endl;
	}
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0,input;
    scanf( "%d",&input );

    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 == input ) nCount++;

    printf( "%d\n",nCount );
    return 0;
}

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


int dfs(int c,int s){
    if( c == 0 ) return s == 0;
    int ans = 0;
    for(int i = 0 ; i < 10 ; i++){
        ans += dfs(c-1, s-i);
    }
    return ans;
}

int main() {
    int n;
    while(cin >> n) cout << dfs(4, n) << endl;
}

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

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

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);
    int ans[5][37]={ 1 };
    for(int i=1; i<=4; i++) {
        ans[i][0]=ans[i-1][0];
        for(int j=1; j<=36; j++) {
            ans[i][j]=ans[i][j-1]+ans[i-1][j];
            if(j>9) ans[i][j]-=ans[i-1][j-10];
        }
    }

    int n;
    while(cin>>n) {
        if(n>36) cout<<"0\n";
        else cout<<ans[4][n]<<'\n';
    }
    return 0;
}

C++: 
#include <iostream>

using namespace std;

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

	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){
							count++;
							break;
						}
						if((a + b + c + d) > n){
							break;
						}
					}
					if((a + b + c) > n){
						break;
					}
				}
				if((a + b) > n){
					break;
				}
			}
		}
		cout << count << endl;
	}
	return 0;
}

C++: #include <iostream>
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 << "\n";
}
	return 0;
	
}

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

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

    return 0;
}

C++: #include<algorithm>
#include<functional>
#include<cmath>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<string>
#include<sstream>
#include<iostream>
#include<iomanip>
#include<vector>
#include<list>
#include<stack>
#include<queue>
#include<map>
#include<set>
#include<bitset>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

typedef unsigned long long ull;
typedef long long ll;

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};

using namespace std;

typedef pair<int ,int > P;

int n,ans;

int main()
{
	while(cin>>n)
	{
		rep(a,10) rep(b,10) rep(c,10) rep(d,10) if(a+b+c+d==n) ans++;
		cout<<ans<<endl;
	}


	return 0;
}

C++: #include <iostream>
using namespace std;
 
int main() {
	int n;
	int count = 0;
	cin >> n;
	for (int i = 0; i < 10;i++) {
		for (int j = 0; j < 10;j++) {
			for (int k = 0; k < 10;k++) {
				if (n - i - j - k >=0 && n - i - j - k <= 9) count++;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <string>
using namespace std;
typedef long long int ll;

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