Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                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++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

Python: import sys
a=[0]*51;x=range(10)
for i in range(51):
 a[i]=sum([1 for p in x for q in x for r in x for s in x if p+q+r+s==i])
for e in sys.stdin:
 print(a[int(e)])

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

int main()
{
	int iN, iCount;

	cin >> iN;

	iCount = 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 == iN )
						iCount++;
				}
			}
		}
	}

	cout << iCount << endl;

	return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <queue>
#include <cmath>

#define int64 long long int

using namespace std;

int main()
{
	int n, count;
	while(cin >> n){
		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 << '\n';
	}
	return 0;
}

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

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

C++: #include <iostream>
using namespace std;
int main(){
	int n,ans=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)ans++;
				}
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
 
int main(int argc, char const* argv[])
{
    int tg;
    int count =0;
while(cin >> tg) {
   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==tg)count++;
    cout << count << endl;
}
    return 0;
}

C++: #include <iostream>

using namespace std;

int main() {
    int n,i,j,k,l,ans;

    while(cin >> n){

        ans = 0;
        for(i = 0;i <= 9;i++){
            for(j = 0;j <= 9;j++){
                for(k = 0;k <= 9;k++){
                    for(l = 0;l <= 9;l++){
                        if(n == i + j + k + l){
                            ans++;
                        }
                    }
                }
            }
        }
        
        cout << ans << endl;
    }
    
    return 0;
}

C++: 
#include <iostream>
#include <sstream>
#include <vector>
#include <algorithm>
#include <string>
#include <functional>
#include <numeric>
#include <ctype.h>
#include <cstdlib>
#include <string.h>
#include <cmath>
#include <cstdio>





using namespace std;


int main()
{
	int count = 0, num;

	cin >> num;

	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 == num)
						count++;
				}
			}
		}
	}

	cout << count << endl;

}

C++: #include<stdio.h>

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

C++: #include <cstdio>

int main(int argc, char *argv[]) {
	using namespace std;
	
	int rcv;
	
	while (EOF != fscanf(stdin, "%d", &rcv)) {
		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 == rcv)
							cnt++;
					}
				}
			}
		}
		printf("%d\n", cnt);
	}
	return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
int memo[51];

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

C++: #include<iostream>
#include<cstring>
#define rep(i,a) for(i=0;i<=a;++i)
using namespace std;

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

C++: #include <algorithm>
#include <iostream>
#include <cstring>
#include <cstdio>
#define mid (l+r>>1)
#define lc (o<<1)
#define rc (o<<1|1)
using namespace std;
const int maxn = 1000010;

int sumv[maxn*4], st[maxn*4], ql, qr, v, _sum;
int n, ans[100], top;

void insert1(int o, int l, int r)
{
    if(ql <= l && r <= qr) {
        sumv[o] = st[o] = 1<<v;
        return;
    }
    if(st[o]) {
        st[lc] = st[rc] = st[o];
        sumv[lc] = sumv[rc] = st[o];
        st[o] = 0;
    }
    int m = mid;
    if(ql <= m) insert1(lc, l, m);
    if(qr >  m) insert1(rc, m+1, r);
    sumv[o] = sumv[lc] | sumv[rc];
    //printf("%d %d %d\n", l, r, sumv[o]);
}

void query(int o, int l, int r)
{
    if(st[o]) {
        _sum |= st[o];
        return;
    }
    if(ql <= l && r <= qr) {
        _sum |= sumv[o];
        return;
    }
    int m = mid;
    if(ql <= m) query(lc, l, m);
    if(qr >  m) query(rc, m+1, r);
}

int gao(int s)
{
    int i = 0;
    top = 0;
    while(s) {
        i++;
        if(s&1) ans[top++] = i;
        s >>= 1;
    }
}

int main()
{
    //freopen("b.txt", "r", stdin);
    //freopen("bout", "w", stdout);
    int m;
    while(scanf("%d%d", &n, &m), n)
    {
        //printf("%d %d\n", n, m);
        if(n == 0) break;
        memset(sumv, 0, sizeof sumv);
        memset(st, 0, sizeof st);
        char op[3];
        for(int i = 0; i < m; i++)
        {
            scanf("%s", op);
            if(op[0] == 'P') {
                scanf("%d%d%d", &ql, &qr, &v); v--;
                insert1(1, 1, n);
                //puts("");
            } else {
                scanf("%d%d", &ql, &qr);
                _sum = 0;
                query(1, 1, n);
                gao(_sum);
                for(int i = 0; i < top; i++) {
                    printf("%d%c", ans[i], i==top-1 ? '\n':' ');
                }
            }
        }
    }
    return 0;
}

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

int main() {
	// your code goes here
	int n;
	while(cin>>n){
	int count=0;
	if(n>36){cout<<0<<endl;}else{
		for(int i=9; i>=0; i--){
			for(int j=i; j>=0; j--){
				for(int k=j; k>=0; k--){
					for(int l=k; l>=0; l--){
						if(i+j+k+l==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
	}
	return 0;
}