Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

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

int main() {

    vector<int> result (51);

    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++) {
                    result[a+b+c+d] += 1;
                }
            }
        }
    }

    int n;
    while (cin >> n) {
        cout << result[n] << endl;
    }
     
    return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, t, cnt;

	while (cin >> n)
	{
		cnt = 0;

		for (int i = 0; i < 10; i++)
		{
			for (int j = 0; j < 10; j++)
			{
				for (int k = 0; k < 10; k++)
				{
					t = n - (i + j + k);

					if (0 <= t && t < 10) { cnt++; }
				}
			}
		}

		cout << cnt << endl;
	}

	return 0;
}

C++: #include<stdio.h>

int main(void){
  int n;
  int answer;

  while(scanf("%d",&n)!=EOF){
    answer=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){answer++;}
                }
            }
        }
    }
    printf("%d\n",answer);
  }
        return 0;
}

C++: #include <stdio.h>
int main(void){
    int n,a,b,c,d,x;
    while(~scanf("%d",&n)){
        x=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)x++;
        printf("%d\n",x);
    }
    return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <sstream>
#include <stdio.h>
#include <vector>
#include <stack>
#include <queue>
#include <algorithm>
#include <math.h>
#include <utility>
#include <string>
#include <ctype.h>
#include <cstring>
#include <cstdio>
#include <sstream>
using namespace std;

#define FOR(i,k,n) for(int i = (k); i < (n); i++)
#define REP(i,n) FOR(i,0,n)
#define INF 114514810
#define ll long long


int main()
{
	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;
	}
	return 0;
}

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

int main() {
	ios_base::sync_with_stdio( false );

	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 ) {
					uint32_t x = n - (i+j+k);

					if( x <= 9 ) {
						count += 1;
					}
				}
			}
		}

		cout << count << endl;
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
    int n;
    int cnt = 0;
    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;
    }
}

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

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

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

C++: #include <cstdio>

using namespace std;

int main() {
  int n;
  while (scanf("%d", &n) == 1) {
    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++;
    printf("%d\n", count);
  }
  return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#define shosu(x) fixed<<setprecision(x)
using namespace std;
int main(){
	int sum;
	while(cin>>sum){
		int ans=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(sum==i+j+k+l) ans++;
					}
				}
			}
		}
		cout<<ans<<endl;
	}
}

C++: #include <iostream>

using namespace std;

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

C++: #define _USE_MATH_DEFINES
#include <iostream> 
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std; 
int main(){
	int n, sum;
	while(cin >> n){
		sum = 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(n == a + b + c + d){
					   sum++;
					   }
				   }
			   }
			}
		}
		cout << sum << endl;
	}
	return 0;
}

C++: using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication
{
    class Program
    {
        static void Main(string[] args)
        {
            while (true)
            {
                var str = Console.ReadLine();
                if (string.IsNullOrEmpty(str)) return;
                Console.WriteLine(pattern(int.Parse(str)));
            }
        }

        static int pattern(int n)
        {
            int ret = 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)
                                ret++;
                        }
                    }
                }
            }
            return ret;
        }
    }
}

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

int combination(int num) {
    int ret = 0;
    for(int n1 = 0; n1 <= 9; n1++) {
        for(int n2 = 0; n2 <= 9; n2++) {
            for(int n3 = 0; n3 <= 9; n3++) {
                for(int n4 = 0; n4 <= 9; n4++) {
                    if(n1 + n2 + n3 + n4 == num) ret++;
                }
            }
        }
    }
    return(ret);
}

int main(void) {
    int num;
    while(cin >> num) cout << combination(num) << endl;
    return(0);
}

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

using namespace std;

int calc(int, int, int);

int for2(int x,int i,int count,int sum){
	return x == -1 ?0 : calc(i, count - 1, sum + x) + for2(x - 1, i, count, sum);
}

int calc(int i, int count,int sum){
	return count == 0 ? sum == i : for2(9, i, count, sum);
}

int main(){
	int i;
	while (cin >> i){
		cout << calc(i, 4, 0) << endl;
	}
	return 0;
}