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 <bits/stdc++.h>
using namespace std;

#define FOR(i,l,r) for(int i = (l);i < (r);i++)
#define ALL(x) (x).begin(),(x).end()
template<typename T> bool chmax(T& a,const T& b){return a < b ? (a = b,true) : false;}
template<typename T> bool chmin(T& a,const T& b){return b < a ? (a = b,true) : false;}
typedef long long ll;

int N;

int main()
{
	while(~scanf("%d",&N)){
		int ans = 0;
		FOR(i,0,10) FOR(j,0,10) FOR(k,0,10) FOR(l,0,10){
			if(i + j + k + l == N) ans++;
		}
		printf("%d\n",ans);
	}

	return 0;
}

C++: #include<iostream>

using namespace std;


int main(void){
	
	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 p=0;p<=9;p++){
						if(i+j+k+p == n)ans++;
					}
				}
			}
		}
		
		cout<<ans<<endl;
	}
}

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

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++ ){
        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] ) nCount++;
                }
            }
       }
    }
    printf( "%d\n",nCount );
    }
    return 0;
}

C++: #include<stdio.h>
#include<iostream>
#include<algorithm>
#include<string.h>
using namespace std;
int main(){
int i,n,j,l,e,g;
while(cin>>n){
g=0;
for(i=0;i<10;i++){
for(j=0;j<10;j++){
for(l=0;l<10;l++){
for(e=0;e<10;e++){
if(i+j+l+e==n)g++;
}
}
}
}
cout<<g<<endl;
}
return 0;
}

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

void calc(std::vector<int> &v) {
    int total;
    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++) {
                    total = i + j + k + l;
                    v[total]++;
                }
            }
        }
    }
    return; 
}

int main(void) {
    std::vector<int> v(37, 0);
    calc(v);

    int total;
    while (std::cin >> total) {
        if (total > 36) {
            std::cout << 0 << std::endl;
        } else {
            std::cout << v[total] << std::endl;
        }
    }
    return 0;
}

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

int main()
{
	int num;
	int c = 0;
	while (cin >> num)
	{
		c = 0;
		if (num > 36 || num < 0)
		{
			cout << 0 << endl;
			continue;
		}
		else
		{
			for (int i = 0; i <= 9; i++)
				for (int j = 0; j <= 9; j++)
					for (int k = 0; k <= 9; k++)
						for (int v = 0; v <= 9; v++)
						{
							if (i + j + k + v == num)
								c++;
						}
		}
	}
	cout << c << endl;
	return 0;
}

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

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

C++: #include<iostream>

int main()
{
	int n;
	int ans = 0;
	while( std::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 ){
						 	ans++;
						}
					}
				}
			}
		}
		
		std::cout << ans << std::endl;
		ans = 0;
	}

 	return 0;
}

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

int res(int n){
 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(i + j + k + l == n) count++;

 return count;
}
int main()
{
 int n;
 while(cin >> n)
  cout << res(n) << '\n';

 return 0;
}

C++: #define _GLIBCXX_DEBUG
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define ALL(v) v.begin(), v.end()
typedef long long ll;

template<class T>bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T>bool chmin(T &a, const T &b) { if (b<a) { a=b; return 1; } return 0; }

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

int main(){
  
  int dp[5][60];
  memset(dp,0, sizeof(dp));
  dp[0][0]=1;
  
  rep(i,4){
    rep(j,60){
      rep(k,10){
        if(j-k>=0) dp[i+1][j]+=dp[i][j-k];
      }
    }
  }
  
  int n;
  while(cin>>n){
    cout<<dp[4][n]<<endl;
  }
  
  return 0;
}

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

int main(){
int n,a,b,c,d,count;
while(scanf("%d",&n) != EOF){

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(a+b+c+d==n)
					count+=1;
			}
		}
	}
}

printf("%d",count);
}
return 0;		
}

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

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

C++: #include<bits/stdc++.h>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<cctype>

#include<cmath>
#include<iostream>
#include<fstream>

#include<string>
#include<vector>
#include<queue>
#include<map>
#include<algorithm>
#include<set>
#include<sstream>
#include<stack>

using namespace std;

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

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


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

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