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>
#include <cmath>
#include <vector>
#include <algorithm>
using namespace std;
int main () {
	int n;
	while(cin >> n){
		int ans = 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){
							ans++;
						}
					}	
				}	
			}
		}
		cout << ans << endl;
	}
}

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

using namespace std;

int main() {

	int N,i,j,k,l,count=0;

	while (cin >> N) {
		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 (N == i + j + k + l)
							count++;
					}
				}
			}
		}
		cout << count << endl;
		count = 0;
	}
	
	return 0;

}

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

using namespace std;

main(){
		int l;
		while(cin>>l){
			int o=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==l){
								o=o+1;
							}
						}
					}
				}
			}
			printf("%d\n",o);
		}
}

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

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

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

using namespace std;


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

C++: #include <iostream>

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

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,n,N,Na;
	while(scanf("%d",&n)!=EOF){
		N=n/4;
		Na=n%4;
		a=N;
		b=N;
		c=N;
		d=N+Na;
		printf("4\n");
	}
	return 0;
}

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

using namespace std;

int comb(int ball, int bar){
    int temp = 1;
    for (int i = ball + bar; i > ball; --i){
        temp *= i;
    }
    
    int d = 1;
    for (int i = bar; i > 0; --i){
        d *= i;
    }
    return temp / d;
}

int main(){
    int input;
    while (cin >> input){
        cout << comb(input, 3) << endl; 
    }
    
}

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

int main() {
	int n, i, j, k, l, count = 0;
	while (cin >> n) {
		count = 0;
		for (i = 0; i<10; i++){
			for (j = 0; j<10; j++){
				for (k = 0; k<10; k++){
					for (l = 0; l<10; l++){
						if (i + j + k + l == n) count++;
					}
				}
			}
		}
		cout << count << endl;
	}
}

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

int main()
{
	int a;
	while(cin>>a)
	{
	cin>>a;
	int b =0;
	for(int c=0;c<10;c++)
		for(int d =0;d<10;d++)
			for(int e =0;e<10;e++)
				for(int f =0;f<10;f++)
				{
					if
						(c+d+e+f==a)
						b=b+1;
				}
				cout<<b<<endl;
}
				
}

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

int countNum(int num) {
	int n = 0;
	for (int a = 0; a < 10 && a <= num ; a++) {
		if (num - a > 27)
			continue;
		for (int b = 0; b < 10 && b + a <= num ; b++) {
			if (num - b - a > 18)
				continue;
			for (int c = 0; c < 10 && c + b + a <= num ; c++) {
				if (num - b - a - c > 9)
					continue;
				n++;
			}
		}
	}
	return n;
}

int main() {
	int n = 0;
	vector<int> dst;
	while (cin >> n) {
		dst.push_back(countNum(n));
	}
	for (vector<int>::iterator it = dst.begin(); it < dst.end(); it++)
		cout << *it << endl;
	return 0;
}

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

int main()
{
	int n,count=0;
	while(cin>>n)
	{
		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;
	}
}

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

const int N = 9;

int main(void) {
  int n = 0;

  while (scanf("%d", &n) != EOF) {
    int count = 0;
    
    for (int i = 0; i <= N; i++) {
      for (int j = 0; j <= N; j++) {
	for (int k = 0; k <= N; k++) {
	  for (int l = 0; l <= N; l++) {
	    if ((i + j + k + l) == n) {
	      count++;
	    }
	  }
	}
      }
    }

    std::cout << count << std::endl;
  }
   
  return 0;
}

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

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

C++: #include <iostream>

using namespace std;

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

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

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

namespace {

int combination(int a, int b, int c, int d)
{
  // (a,a,a,a)
  if (a == d) {
    return 1;
  }
  // (a,a,a,d) or (a,b,b,b)
  else if (a == c || b == d) {
    return 4;
  }
  // (a,a,c,c)
  else if (a == b && c == d) {
    return 6;
  }
  // (a,a,c,d) or (a,b,b,d) or (a,b,c,c)
  else if (a == b || b == c || c == d) {
    return 12;
  }
  // (a,b,c,d)
  else {
    return 24;
  }
}

int calc(int n)
{
  int com = 0;
  int a, b, c, d;

  for (a = 0; a <= 9; ++a) {
    for (b = a; b <= 9; ++b) {
      for (c = b; c <= 9; ++c) {
        for (d = c; d <= 9; ++d) {
          const int sum = a + b + c + d;
          if (sum == n) {
            com += combination(a, b, c, d);
          }
          else if (sum > n) {
            return com;
          }
        }
      }
    }
  }

  return com;
}

} // unnamed namespace

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

  return 0;
}

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

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