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>

using namespace std;
int N;

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

}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	while ( cin >> n ) {
		if (n>18) n = 36 - n;
		cout << ((n+1)*(n+2)*(n+3))/6 << endl;
	}
	
	return 0;
}

C++: #include <math.h>
#include <ctype.h>
#include <bits/stdc++.h>
using namespace std;
#define FOR(i, a, n) for (int i = a; i < n; i++)
#define REP(i, n) for(int i = 0; i < n; i++)
struct omt{omt(){ios::sync_with_stdio(false);cin.tie(0);}}star;

bool binary_search(int x, vector<int> A){
    int l = 0, r = 10, mid;
    while(l < r){
        mid = (l + r) / 2;
        if(x == A[mid]) return true;
        else if(x < A[mid]) r = mid;
        else if(A[mid] < x) l = mid + 1;
    }
    return false;
}

int main(){
    vector<int> A;
    REP(i, 10) A.push_back(i);

    int n;
    while(cin >> n){
        int cnt = 0;
        REP(i, 10){
            REP(j, 10){
                REP(k, 10){
                    int hoge = n - (i + j + k);
                    if(binary_search(hoge, A)) cnt++;
                }
            }
        }
        cout << cnt << endl;
    }


    return 0;
}

C++: #include <stdlib.h>
#include <stdio.h>

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

    printf("%d\n", cnt);
  }
}

C++: #include <iostream>
#include <cstdio>
#include <algorithm>
#include <cassert>
#include <vector>
#include <string>
#include <cmath>
#include <map> 
#include <sstream>
#include <cstdio>
#include <complex>
#include <cstring>
using namespace std;
 
const int MAX= 10000100;

#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()
#define ll long long int
#define gcd(a,b) __gcd(a,b)
#define pb(a) push_back(a)
int GCD(int a, int b) {if(!b) return a; return gcd(b, a%b);}
int lcm(int a, int b) {return a*b / gcd(a, b);}

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


  }
    
}

C++: #include <iostream>
#include <cstdio>
#include <stdio.h>

using namespace std;

int main(void)
{

	int val,count = 0;
	while (scanf("%d", &val) != EOF)
	{
		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 == val)count++;

					}

				}


			}


		}

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

	}

}

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

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

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

using namespace std;

int main() {
	int num[4], n;
	int count = 9;
	int point[10] = {0};

	cin >> n;

	for(int i = 0; i < 4; i++) {
		if(n - count >= 0) {
			n -= count;
			num[i] = count;
		}
		else {
			count--;
			i--;
		}
	}


	for(int i = 0; i < 4; i++) {
		point[num[i]]++;
	}

	int p = 0;

	for(int i = 0; i < 10; i++) {
		p = max(p, point[i]);
	}


	int ans = 1;

	if(p == 4) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
	}
	else if(p == 3) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 6;
	}
	else if(p == 2) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 2;
	}
	else if(p == 1) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= ans;
	}

	cout << ans << endl;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <deque>
#include <list>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>

using namespace std;

int n;

int recur(int num, int dep) {
	int ret = 0;

	if (dep == 0) {
		if (num == 0) return 1;
		else return 0;
	}
	for (int i = 0; i < 10 && i <= num; i++) {
		ret += recur(num - i, dep - 1);
	}

	return ret;
}

int main() {
	n = -1;
	cin >> n;

	while (n != -1) {
		cout << recur(n, 4) << endl;
		
		n = -1;
		cin >> n;
	}

	return 0;
}

/*@@@@@@@@@@@@@@@@@@@@@@@@@*/
/*@                       @*/
/*@ debug output erased ? @*/
/*@                       @*/
/*@@@@@@@@@@@@@@@@@@@@@@@@@*/

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

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

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

C++: #include <stdio.h>

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

C++: #include <iostream>

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

using namespace std;

int main(void){
	for(int n, count = 0; cin >> n; cout << count << endl, count = 0)
		rep(a, 9) rep(b, 9) rep(c, 9) rep(d, 9)
			if(a + b + c + d == n) count ++;
					
	return 0;
}

C++: #include<stdio.h>
int main(void)
{
	int i,j,k,l;
	int cnt;
	int n;

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