Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

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

int resolve(int input)
{
	int result = 0;
	int max_a = std::min(9, input);
	for (int a = 0; a <= max_a; ++a) {
		int max_b = std::min(9, input - a);
		for (int b = 0; b <= max_b; ++b) {
			int max_c = std::min(9, input - a - b);
			for (int c = 0; c <= max_c; ++c) {
				int d = input - a - b - c;
				if (0 <= d && d <= 9) {
					++result;
				}
			}
		}
	}
	return result;
}

int main()
{
	int input;
	while (std::cin >> input) {
		std::cout << resolve(input) << std::endl;
	}

	return 0;
}

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

int countsum(int& n)
{
    static int a, b, c, d;
    static int count;
    count = 0;
    for(a=0; a < 10; a++)
    {
        if(a > n) break;
        for(b=0; b < 10; b++)
        {
            if(a + b > n) break;
            for(c=0; c < 10; c++)
            {
                if(a + b + c > n) break;
                for(d=0; d < 10; d++)
                {
                    if(a + b + c + d > n) break;
                    if(a + b + c + d == n) count++;
                }

            }
            
        }
        
    }

    return count;
}

int main()
{
    int n;
    while(cin >> n)
    {
        cout << countsum(n) << endl;
    }
    return EXIT_SUCCESS;
}

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

int main()
{
	int n, cnt;

	while(scanf("%d\n", &n)+1)
	{
		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;
	}
}

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

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

	return 0;
}

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

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

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

int main()
{
	int n,c;

	while(cin >> n){
		c = 0;
		if(n < 37){
			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)
								++c;
						}
					}
				}
			}

			cout << c << endl;

		}else{
			cout << 0 << endl;
		}

	}
	return 0;
}

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

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

C++: #include <stdio.h>

int main(){
    int n,cnt = 0;
    int a,b,c,d;
    while(scanf("%d",&n)!=EOF){
        if(n<37){
            for(a=0;a<10&&a<=n;a++){
                for(b=0;b<10&&a+b<=n;b++){
                    for(c=0;c<10&&a+b+c<=n;c++){
                        d = n-a-b-c;
                        if(d<10)cnt++;
                    }
                }
            }
        }
        printf("%d\n",cnt);
    }
}

C++: import java.util.Scanner;
public class Main { 
  public static void main(String[] args){
	  int count=0;
	  int a=0;
	  Scanner sc = new Scanner(System.in);
			//  int n = sc.nextInt();
	  for (int i = 0;i<=9;i++) {
          int n = sc.nextInt();
		  for(int j = 0;j<=9;j++) {
			  for(int k =0;k<=9;k++) {
				  for(int l = 0;l<=9;l++) {
					  a = i + j + k + l;
					  if(a==n) count++;
				  }
			  }
		  }
		  
	  }
	  System.out.println(count);
  
  }
}

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

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

C++: #include <iostream>

using namespace std;

#define rep(i,n) for(int i = 0;i < n;i++)

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

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

int main(void){
  int dp[50][4];
  for(int i = 0; i < 50; i++){
    for(int j = 0; i < 4; j++){
      if(i < 10 && j == 0)
	dp[i][j] = 1;
      else
	dp[i][j] = 0;
    }
  }
  
  for(int i = 1; i < 4; i++){
    for(int j = 0; j < 10; j++){
      for(int k = 0; k < 37; k++){
	if(k - j >= 0){
	  dp[k][i] += dp[k - j][i - 1];
	}
      }
    }
  }
  
  int n;
  while(cin >> n){
    cout << dp[n][3] << endl;
  }
  return 0;
}

C++: #include<iostream>

int n,ans;

int sum(){
	ans = 0;
	int a=0,b=0,c=0,d=0;
	for(;a<10;a++){
		for(;b<10;b++){
			for(;c<10;c++){
				for(;d<10;d++)
					if(a+b+c+d==n)
						ans++;
				d=0;
			}
			c=0;
		}
		b=0;
	}
	return ans;
}

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

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

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

C++: #include <cstdio>

using namespace std;

bool testcase_ends() {
    int n;
    if (scanf("%d", &n) == EOF)
        return 1;

    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;

    printf("%d\n", res);
    return 0;
}

int main() {
    bool solved_one=false;
    while (!testcase_ends())
        solved_one |= true;

    return !solved_one;
}

C++: #include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,j,k,l,n,cnt;
	while(scanf("%d",&n)!=EOF) {
		cnt=0;
		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(i+j+k+l==n) {
							cnt++;
						}
					}
				}
			}
		}
		printf("%d\n",cnt);
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <time.h>
#include <math.h>
#include <vector>
#include <queue>
#include <map>
#include <set>
#include <algorithm>
#include <iterator>
#include <sstream>
#include <string>
#include <bitset>
using namespace std;
#define rep(I,N) for(int I = 0; I < (int)(N); I++)
#define FIN(V) cout<<V<<endl
#define pb push_back
#define INF (1 << 30)
typedef pair<int, int> P;
typedef long long ll;
typedef priority_queue<int> pq;
int StrToInt(string);
string IntToStr(int);

int main(void){
	int dp[4][51];
	fill_n(*dp, 4*51, 0);
	rep(i, 10)dp[0][i] = 1;
	for(int i = 1; i <= 3; i++){
		for(int j = 36; j >= 0; j--){
			for(int k = 0; k <= 9; k++){
				if(j-k < 0)break;
				dp[i][j] += dp[i-1][j-k];
			}
		}
	}
	int n;
	while(cin >> n)
		FIN(dp[3][n]);

	return 0;
}