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 main(void) {
	int a, b, c, d, n, res;

	while(!cin.eof()) {
		cin >> n;
		res = 0;
		for(d = 0; d < 10; d++) {
			for(c = 0; c < 10; c++) {
				for(b = 0; b < 10; b++) {
					for(a = 0; a < 10; a++) {
						if(a+b+c+d == n) { res++; }
					}
				}
			}
		}
		if(!cin.eof()) { cout << res << endl; }
	}

	return 0;
}

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

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

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

using namespace std;

int main(){

	int n;
	
	while(1){

		cin >> n;
		if(cin.eof())
			break;

		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++;
					}
				}
			}
		}
		
		cout << count << endl;
	}

	return 0;
}

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

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

using namespace std;

int ans[51];

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

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

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

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

int main(){

	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<cstdio>
using namespace std;
int main()
{
	int n,c=0;
	while(scanf("%d",&n)!=EOF){
		c=0;
	for(int i=0;i<10;i++){
		for(int i2=0;i2<10;i2++){
			for(int i3=0;i3<10;i3++){
				for(int i4=0;i4<10;i4++){
					if(i+i4+i2+i3==n)c++;
				}
			}
		}
	}
	printf("%d\n",c);}
	return 0;
}

C++: #include <bits/stdc++.h>
#define int long long
using namespace std;
const int INF = 1e9 + 7, MOD = 1e9 + 7;
const long long LINF = 1e18;
const int dx[4] = {1, 0, -1, 0}, dy[4] = {0, 1, 0, -1};
signed main() {
	int n, ans = 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 (a + b + c + d == n) {
						ans++;
					}
				}
			}
		}
	}
	cout << ans << endl;
	return 0;
}

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

int res;
int n;

void dfs(int u, int all)
{
	if(u == 4)
	{
		if(all == n) res ++;
		return;
	}
	
	for(int i = 0; i < 10; i ++ )
		dfs(u + 1, all + i);
}

int main()
{
	while(cin >> n)
	{
		res = 0;
		
		dfs(0, 0);
		
		cout << res << endl;
	}
}

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

int n;
int ans;

int main(void)
{
	int d[4][61] = {};

		for(int i = 0; i <= 9; i++)
			d[0][i]++;
		for(int i = 0; i < 3; i++){
			for(int j = 0; j <= 9; j++){
				for(int k = 0; k <= 50; k++){
					d[i+1][k+j] += d[i][k];
				}
			}
		}


	while(cin >> n, n){
		ans = 0;
	
		ans = d[3][n];
		cout << ans << endl;
	}


	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
	long long n;
	while(cin >> n){
		long long 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++){
						if(n-a-b-c>=0 and n-a-b-c<10){
							ans++;
						}
					}
				}
			}
		}
		cout << ans << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>
#include <sstream>
#include <cstdlib>
#include <cstring>
#include <functional>
#include <numeric>
#include <cmath>
#include <climits>
#include <limits>
#include <cfloat>
#include <fstream>
using namespace std;

int main()
{
	int in;
	cin >> in;

	int n = in % 4;
	vector <int> c (4, 0);

	for (int i = 0; i < n; ++i){
		c[i] = 1;
	} // end for

	sort (c.begin(), c.end() );

	int res = 0;
	do{
		++res;
//		for (int i = 0; i < c.size(); ++i){
//			cout << c[i] << ' ';
//		} // end for
		cout << endl;

	}while (next_permutation(c.begin(), c.end() ) );

	cout << res << endl;	
		
	return 0;
}

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

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

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

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

C++: #include<bits/stdc++.h>
#define rep(i, x) for(int i = 0; i < (int)(x); i++)
#define reps(i, x) for(int i = 1; i <= (int)(x); i++)
#define UNIQUE(v) v..erase( unique(v.begin(), v.end()), v.end() );
#define Size(x) ((int)(x).size())
using namespace std;

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

C++: #include<iostream>
using namespace std;
 
int main()
{
int n,combo=0;
while(cin>>n)
{

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)
combo++;


}

cout<<combo<<endl;
return 0;
}