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>
using namespace std;

int main(){
  int n;
  cin >> n;
  int a = 0, b = 0, c = 0, d = 0, m = 0;
  if(a+b+c+d == n) m++;
  for(int i = 0; i < 9; i++){
    a++;
    if(a+b+c+d == n) m += 4;
    b++;
    if(a+b+c+d == n) m += 4;
    c++;
    if(a+b+c+d == n) m += 4;
    d++;
    if(a+b+c+d == n) m++;
  }

  cout << m << endl;

  return 0;
}

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++){
                	for(int l=0;l<10;l++){
                    	if(i+j+k+l==n)
                    		cnt++;
                	}
            	}
        	}
    	}
		cout << cnt << endl;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
  int a,b,c,d,n,count=0;
  while(scanf("%d",&n)!=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==n){
	      count++;
	    }
	  }
	}
      }
    }
    printf("%d\n",count);
    count=0;
  }
  return(0);
}

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

int GetCombinationCount(int 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++;
				}
			}
		}
	}
	return Count;
}

int main()
{
	while(true){
		int n;
		cin >> n;
		if(cin.eof() == true) break;
		cout << GetCombinationCount(n) << endl;
	}
	return 0;
}

C++: #include<stdio.h>

int main(){
	int n;

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

		printf("%d\n",count);
	}


}

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

}

C++: #include <bits/stdc++.h>

using namespace std;
using ll = long long;
using pii = pair<int, int>;

int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(false);
  cout << fixed << setprecision(10);
  
  int n;
  while (cin >> n) {
    int ans = 0;
    for (int i = 0; i < 10; i++) {
      for (int j = 0; j < 10; j++) {
        for (int k = 0; k < 10; k++) {
          int l = n - i - j - k;
          ans += (l >= 0 && l < 10);
        }
      }
    }
    cout << ans << endl;
  }

  return 0;
}

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

using namespace std;

int main(){
  int num,count;
  vector<int> v(4,0) ;
  while(cin >> num){
    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(i + j + k + l == num){
              ++count ;
            }
          }
        }
      }
    }
    cout << count << endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

bool calc(int a, int b, int n) {
	int tmp = n-a-b;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (tmp == c+d) return true;
		}
	}
	return false;
}

void solve(int n) {
	int count = 1;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			if (calc(a,b,n)) count++;
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

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

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

using namespace std;

int main (void) {
	int n, MAX = 9, count;
	
	while (scanf("%d", &n) != EOF) {
		count = 0;
		
		for (int a = 0; a <= MAX; a ++) {
			for (int b = 0; b <= MAX; b ++) {
				for (int c = 0; c <= MAX; c ++) {
					for (int d = 0; d <= MAX; d ++) {
						if (a + b + c + d == n) {
							count ++;
						}
					}
				}
			}
		}
		
		cout << count << endl;
	}
	
	return 0;
}

C++: #include<iostream>
using namespace std;
int c(int m,int n)
{
	int s=1;
	for(int i=0;i<m;i++)
		s=(s*(n-i))/(i+1);
	return s;
}
int main()
{
	int n,s;
	while(cin>>n)
	{
		s=0;
		if(n>18)n=36-n;
		s+=c(3,n+3);
		n-=9;
		while(n>0)
		{
			s-=c(2,n+1);
			n--;
		}
		cout<<s<<endl;
	}
	return 0;
}

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

int main(void)
{
    int n = 0;
    
    while(cin >> n){
        int ans = 0;
        if(n >= 37) continue;

        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++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


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

C++: #include<iostream>
using namespace std;
int dp[40];
int main(){
	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++){
					dp[i+j+k+l]++;
				}
			}
		}
	}
	while(true){
		int n;cin>>n;
		cout<<dp[n]<<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;
  
  while(scanf("%d",&n)!=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==n){
					  C++;
				  }
			  }
		  }
	  }
  }
  }
  cout<<C<<endl;
  
  return 0;
}

C++: #include <iostream>
#include <vector>
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 <stdio.h>
#include <string.h>

int dp[2][51];

int main()
{
	while(1)
	{
		int n;
		if(EOF == scanf("%d",&n))
		{
			break;
		}
		int now = 0;
		for(int i = 0; i <= 50; i++)
		{
			dp[now][i] = 0;
		}
		dp[now][0] = 1;
		for(int k = 0; k < 4; k++)
		{
			int nex = (now + 1) % 2;
			for(int i = 0; i <= 50; i++)
			{
				dp[nex][i] = 0;
			}
			for(int j = 0; j <= 50; j++)
			{
				for(int i = 0; i <= 9; i++)
				{
					if(j + i <= 50)
					{
						dp[nex][j + i] += dp[now][j];
					}
				}
			}
			now = nex;
		}
		printf("%d\n",dp[now][n]);
	}
	return 0;
}