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 <stdio.h>
#include <iostream>
#include <math.h>

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

C++: #include<iostream>
using namespace std;
int main() {
	int a, b;
	while (cin >> a ) {
		b = 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 == a){
								cout << i << j << k << l << endl;
								b = b + 1;
						}
					}
				}
			}
		}
		cout << b << endl;
	}
}

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

using namespace std;


int main(void)
{
	int n = 0;

	while (scanf("%d" , &n) && n != EOF)
	{
		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 l = 0; l <= 9; l++)
					{
						if (n == i + j + k + l)
						{
							ans++;
						}
					}
				}
			}
		}

		cout << ans << endl;
	}

	return 0;
}

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	int out=0;
	
	while(cin.eof()!=true){
	    cin >>in;
	    out=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==in){
					    out++;	
					    }	
				    }
			    }
		    }
	    }
	    	cout <<out<<endl;
	}

	
	return 0;
}

C++: #include <iostream>


int countPattern(int n) {
  int count = 0;
  int ni, ij, ijk;
  for (int i = 0; i < 10; i ++) {
    ni = n - i;
    for (int j = 0; j < 10; j ++) {
      ij = ni - j;
      for (int k = 0; k < 10; k ++) {
        ijk = ij - k;
        if (0 <= ijk && ijk <= 9) {
          count ++;
        }
      }
    }
  }
  return count;
}


int main () {
  int n;
  while (std::cin >> n) {
    std::cout << countPattern(n) << std::endl;
  }
  return 0;
}

C++: #include <iostream>

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

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

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

C++: #include<stdio.h>
#include<stdlib.h>
#include<iostream>
#include<string>
#include<string.h>
#include<vector>
#include<math.h>
#include<queue>
#include <algorithm>
#include<functional>
#include<cstdlib>
#include<cmath>


#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++)
#define FORR(i, m, n) for(int i = m;i >= n;i--)
#define CI cin >>
#define CO cout <<
#define E << endl;

using namespace std;

typedef pair<int, int> P;
typedef pair<long, long> LP;
typedef pair<int, P> PP;
typedef pair<long, LP> LPP;

int N;

int dy[] = { 0, 0, 1, -1, 0 };
int dx[] = { 1, -1, 0, 0, 0 };


void input(void) {
	
	return;
}


int main(void) {


	int answer = 0;
	
	while (CI 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) {
							answer++;
						}
					}
				}
			}
		}

		CO answer E
		answer = 0;
	}
	
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int a;
int b;
int c;
int main(){

	
	while (cin >> a){
		c++;
			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 ==a ){
								b++;
							}
						}
					}
				}
			}
}
	while (cin>>a){
	cout << b << endl;
	
	}

	return 0;
}

C++: #include<cstdio>


int
 n,ans;

int
 main()
 {
	
while
 (~scanf("%d"
,&n))
	
{
		
for
 (int
 f1 = 0; f1 < 10; f1++)
		
{
			
for
 (int
 f2 = 0; f2 < 10; f2++)
			
{
				
for
 (int
 f3 = 0; f3 < 10; f3++)
				
{
					
for
 (int
 f4 = 0; f4 < 10; f4++)
					
{
						
if
 (n == (f1 + f2 + f3 + f4))
							
ans++;
					
}
				
}
			
}
		
}
		
printf("%d\n"
,ans);
		
ans = 0;
	
}
 }

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    while(1){
    int n=0,cnt=0;
    if(scanf("%d",&n)==EOF)break;
    for(int i=0;i<10;i++){
        for(int r=0;r<10;r++){
            for(int l=0;l<10;l++){
                for(int k=0;k<10;k++){
                    if(n==i+r+l+k)cnt++;
                }
            }
        }
    }
    cout << cnt <<endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using uint = unsigned int;
using lint = long long int;
using ulint = unsigned long long int;
template<class T = int> using V = vector<T>;
template<class T = int> using VV = V< V<T> >;
template<class T, class U> void assign(V<T>& v, int n, const U& a) { v.assign(n, a); }
template<class T, class... Args> void assign(V<T>& v, int n, const Args&... args) { v.resize(n); for (auto&& e : v) assign(e, args...); }


int main() {
  cin.tie(nullptr); ios_base::sync_with_stdio(false);
  string s;
  while (getline(cin, s)) {
    int n = stoi(s);
    int res = 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) ++res;
    }
    cout << res << '\n';
  }
}

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

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

int x;

int mySet(int d,int e){
	int a=0;
	if(d==4){
		if(e==x){
			return 1;
		}else{
			return 0;
		}
}
	for(int i=0;i<=9;i++){
		a+=mySet(d+1,e+i);
	}
	return a;
}

int main(void){
	while(scanf("%d",&x)!=EOF){
		cout<<mySet(0,0)<<endl;
	}
	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
void sumOf()
{
	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;

	}

}
int main()
{
	sumOf();
	return 0;
}