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 kaijo(int n)
{
	if (n==0)
		return 1;
	else
		return n * kaijo(n-1);
}

int permutation(int a,int b)
{
	return kaijo(a) / kaijo(a-b);
}

int combination(int a,int b)
{
	return permutation(a,b) / kaijo(b);
}

int how_much_plus_pair(int n)
{
	return combination(4,n % 4);
}

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

C++: #include <iostream>


int func(int 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++;
					}
				}
			}
		}
	}

	return count;
}



int main(){
	int input;

	while (std::cin >> input){
			std::cout << func(input) << "\n";
	}
	
	return 0;
}

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

int check(int x,int y,int z,int w){

}

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

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

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

C++: #include <iostream>

using namespace std;
int main(){
    int a, b, c, d, i, n[2], jumlah[2];

    for(i=0; i<2; i++){
        jumlah[i] = 0;
        cin>>n[i];
        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[i]){
                                jumlah[i]++;
                            }
                    }
                }
            }
        }
    }
    for(i=0; i<2; i++)
        cout<<jumlah[i]<<endl;

    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main() {
	int n;
	while (cin >> n) {
		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 x = 0; x < 10; x++) {
						if (i + j + k + x == n)ans++;
					}
				}
			}
		}
		cout << ans <<endl;
	}
}

C++: #include <iostream>
using namespace std;
int main() {
	int n;
	while(cin>>n){
		int 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++;
		cout<<cnt<<endl;
	}
}

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

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <set>
#include <map>
//ranker
using namespace std;

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


int main(){
    int n, ans;

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

        if(n <= 36){
            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;

int main(){
  int n;
  while(cin >> n){
    int cnt = 0;
    for(int a = 0; a < 10; a++){
      for(int b = 0; b < 10; b++){
	for(int c = 0; c < 10; c++){
	  int d = n - (a + b + c);
	  if(d >= 0 && d <= 9) cnt++;
	}
      }
    }
    cout << cnt << endl;
  }
}

C++: #include<iostream>
#define REP(i,n) for(int i=1;i<=n;i++)
using namespace std;

#define N 10

int main()
{
    int t;
    while(1)
    {
        cin >> t;
        int ans = 0;
        for(int i=1;i<=9;i++)for(int j=1;j<=9;j++)for(int k=1;k<=9;k++)for(int l=1;l<=9;l++)if((i+j+k+l)==t)ans++;

        cout << ans << endl;
    }

    return 0;
}

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

int serch(int cnt,int n){
	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++;
	return cnt;
}

int main() {
	int n;
	while(cin>>n){
		int cnt=0;
		if(n<36) cnt=serch(cnt,n);
		cout<<cnt<<endl;
	}
	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<iostream>

using namespace std;

int main() {
	int n, count;

	while (cin >> n) {
		count = 0;
		if (n <= 36) {
			if (n > 18) n = 36 - n;
			for (int i = 0; i <= 9; i++) {
				if (i > n) break;

				for (int j = 0; j <= 9; j++) {
					if (i + j > n) break;

					for (int k = 0; k <= 9; k++) {
						if (i + j + k > n) break;

						for (int l = 0; l <= 9; l++) {
							if (i + j + k + l == n) {
								count++;
								break;
							}
						}
					}
				}
			}
		}
		cout << count << endl;
	}

	return 0;
}