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 <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main(void)
{
	int n;
	while (cin >> n)
	{
	    int count = 0;
	    rep(i, 10)
	    {
	        rep(j, 10)
	        {
	            rep(k, 10)
	            {
	                rep(l, 10)
	                {
	                    if (i + j + k + l == n) count++;
	                }
	            }
	        }
	    }
	cout << count << endl;
	}
}

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

using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(){
  int n;
  while(cin >> n){
    int res = 0;
    for(int i=0;i<10000;i++){
       int s = 0;
       for(int t=i;t;t/=10) s += t%10;
       if(s==n) res++;
    }
    cout << res << endl;
  }
}

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

int main() {
  int x;
  while(cin >> x) {
    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(i+j+k+l==x) ans++;
    cout << ans << endl;
  }
}

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	while(cin >> n){
		if(n > 36){
			a[t] = 0;
			continue;
		}
		else if(n > 18){
			n = 36-n;
		}
		a[t] = 1;
		for(int i = n+3; i >=n; i--){
			a[t] = a[t]*i;
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i]/6 << endl;
	}
}

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

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

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 n, count=0;

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

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

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

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(){
	int n;
	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 <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0;i<n;i++)
#define INF (int) 2e9
#define MOD (int) 1e9 + 7

int main(){
    int n;
    while(cin >> n){
        int cnt = 0;
        rep(a, 10){
            rep(b, 10){
                rep(c, 10){
                    rep(d, 10){
                        if(a+b+c+d == n) cnt++;
                    }
                }
            }
        }
        cout << cnt << endl;
    }
    return 0;
}

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

int main(){
	int in;
	while (cin >> in, !cin.eof()){
		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 (i + j + k + l == in)	ans++;
		cout << ans << endl;
	}
}

C++: #include <iostream>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <string>
#include <vector>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>

using namespace std;

int gcd( int, int );

int main()
{
	int n, count;

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

	return 0;
}

C++: #include <iostream>

using namespace std;

int calc(int a, int b, int n) {
	int tmp = n-a-b;
	int count = 0;
	for (int c=0; c<10; c++) {
		for (int d=0; d<10; d++) {
			if (tmp == c+d)
				count++;
		}
	}
	return count;
}

void solve(int n) {
	int count = 0;
	for (int a=0; a<10; a++) {
		for (int b=0; b<10; b++) {
			count += calc(a,b,n)
		}
	}
	cout << count << endl;
}

int main() {
	int n;
	while (cin >> n) {
		solve(n);
	}
	return 0;
}

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

int res(int n){
 int 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++;

 return count;
}
int main()
{
 int n;
 while(cin >> n)
  res(n);

 return 0;
}

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

int main(){
  int n;
  while(cin >> n){
    int cnt;
    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(){
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int n;
	while(cin >> n){
	
	int ans = 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){
						ans++;
					}
				}
			}
		}
	}
	
	cout << ans << endl;
	
	return 0;
	}
}