Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

C++: #include <iostream>
#include <iomanip>
#include <cmath>
#include <string>
#include <algorithm>

using namespace std;

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

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

C++: #include<iostream>
int main(){
	int n;
	int a, b, c, d;
	int count;
	std::cin >> n;
	while (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++;
								break;
							}
						}
					}
				}
			}
			std::cout << count;
		return 0;
	}
}

C++: //↓template↓

#include "bits/stdc++.h"
using namespace std;
#define Would
#define you
#define all(n)  n.begin(),n.end()
const long long INF = 1e18;
const long long MOD = 1e9 + 7;
const double pi = acos(-1);
const int SIZE = 1 << 17;
int dx[] = { 1,0,-1,0 }, dy[] = { 0,1,0,-1 }, alp[30];
long long fac[200005], finv[200005], inv[200005];
vector<long long>dij;
struct edge { long long to, cost; };
vector<vector<edge> >G;

long long mod_pow(long long a, long long b) {
	long long res = 1, mul = a;
	for (int i = 0; i < 31; ++i) {
		if (b >> i & 1) {
			res *= mul;
			res %= MOD;
		}
		mul = (mul * mul) % MOD;
	}

	return res;
}

void addedge(int from, int to, int cost) {
	G[from].push_back({ to,cost });
	G[to].push_back({ from,cost });
}

//↑template↑

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

C++: #include<iostream>

using namespace std;

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

C++: #include<stdio.h>

int main(void){

	int a,b,c,d,n,count,i,j,k;

	scanf("%d",&n);
	
	if(n>50){
		return 0;
	}
	
	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){
						count++;
					}
				}
			}
		}
	}

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

}

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

int main(){
	int n,ans;

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

C++: #include<iostream>

using namespace std;

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

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

int main() {
  int n;
  int a, b, c, d;
  int sum=0;
  int max=9;
  int count;
  while (1) {
    cin >> n;
    if (cin.eof()) break;
    count = 0;
    for (a=0; a<10; a++) {
      if (a > n) break;
      for (b=0; b<10; b++) {
        sum=a+b;
        if (sum > n) break;
        if (n-sum > 2*max) continue;
        for (c=0; c<10; c++) {
          sum = a+b+c;
          if (sum > n) break;
          if (n-sum > max) continue;
          count++;
        }
      }
    }
    cout << count << endl;
  }
}

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

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

C++: 
#include<iostream>
#include<string>
#include<cmath>
#include<vector>
#include<stack>
#include<queue>
#include<algorithm>
#include<complex>
using namespace std ;
typedef vector<int> vi ;
typedef vector<vi> vvi ;
typedef vector<string> vs ;
typedef pair<int, int> pii; 
typedef long long ll ;

#define loop(i,a,b) for(int i = a ; i < b ; i ++)
#define rep(i,a) loop(i,0,a)
#define all(a) (a).begin(),(a).end()

int main(void){
  int n ; 
  while(cin >> n){
    int cnt = 0;
    rep(i,10)
      rep(j,10)
      rep(k,10)
      rep(l,10)
      if(i+j+k+l==n){
	cnt++;
	//	cout<< i << " " << j << " " << k << " " << l << endl;
	cout<< cnt << endl;
      }
    cout<< cnt << endl;
  }
}

C++: #include <map>
#include <string>
#include <iostream>
#include<vector>
#include <set>
#include<algorithm>

using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(void){
  for(int n, count = 0; cin >> n; cout << count << endl, 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 ++;

  return 0;
}

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

int main()
{
        int n,count;
        while(cin >> n){
                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>
int t[37],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]);}