Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

C++: #define _USE_MATH_DEFINES
#include <cmath>
#include <iostream>

using namespace std;

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

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

int ans;

void SofI(int num, int n) {
	if (num > n * 9) { return; }
	else if (num < 0) { return; }
	else if (num != 0 && n == 0) { return; }
	else if (num == 0) {
		ans++;
		return;
	}
	else {
		for (int i = 0; i < 10; i++) {
			SofI(num - i, n - 1);
		}
	}

}

int main(void) {
		int num;
		while (cin >> num) {
			int ans = 0;
			SofI(num, 4);
			cout << ans << endl;
		}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
    int table[36 + 1] = {};
    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) {
		    ++table[a + b + c + d];
		}
	    }
	}
    }
    int in;
    while (cin) {
	cin >> in;
	if (0 <= in && in <= 36)
	    cout << table[in] << endl;
    }
    return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#define M_PI 3.14159265358979
#include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include<iomanip>
#include<vector>
#include<cmath>
#include <algorithm>

using namespace std;


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

C++: #include <iostream>

#define VARIABLE(x) cerr << #x << "=" << x << endl
#define BINARY(x) cerr << #x << "=" << static_cast<bitset<16> >(x) << endl;
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define REP(i,m,n) for (int i=m;i<(int)(n);i++)

const int INF = 10000000;
int dx[4]={1, 0, -1, 0}, dy[4]={0, 1, 0, -1};
using namespace std;
typedef long long  ll;

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

C++: #include<cstdio>
#include<cstring>
#include<algorithm>
#include<functional>
using namespace std;
int main(void)
{
	int i,j,k,l,n,cnt;
	
	
	while(scanf("%d",&n)!=EOF) {
		cnt=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(i+j+k+l==n) {
							cnt++;
						}
					}
				}
			}
		}
	}
	printf("%d\n",cnt);
	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	while ( cin >> n ) {
		int count;
		if (n>36) count = 0;
		else if (n<=9) count = ((n+1)*(n+2)*(n+3))/6;
		else if (n<=18) count = -((n-9)*(n-8)*(n-7))/6 + 27*n - 23;
		// 220 - ((n-10+1)*(n-10+2)*(n-10+3))/6 + 27 * (n-9)
		else if (n<=27) count = -((27-n)*(28-n)*(29-n))/6 + 27*(36-n) - 23;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}

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

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

C++: #include<stdio.h>

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

C++: #include<iostream>
using namespace std;
int main(){int n;while(cin>>n){int counter=0;for(int a=0;a<10;a++){for(int b=0;b<10;b++){for(int c=0;c<10;c++){if(0<=n-a-b-c && n-a-b-c<=9){counter++;}}}}cout<<counter<<endl;}return 0;}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>

#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl bool
#define nn printf("\n");
#define mod 1000000007

using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n = 0;
	while (cin >> n)
	{
		int a = 0, b = 0, c = 0, d = 0;
		int num = 0;

		rep(i, 10)
		{
			rep(j, 10)
			{
				rep(k, 10)
				{
					rep(l, 10)
					{
						if(i + j + k + l == n)
						{
							num += 1;
						}
					}
				}
			}
		}
		printf("%d\n", num);
	}

	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
    int n=0,cnt=0;
    cin >> n;
    for(int i=0;i<10;i++){
        for(int r=0;r<10;r++){
            for(int l=0;l<10;l++){
                for(int k=0;k<10;k++){
                    if(n==i+r+l+k)cnt++;
                }
            }
        }
    }
    cout << cnt;
    return 0;
}

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

int main () {

int n, count = 0;

while(cin >> n){

    for (int a = 0; a < 10 && a <= n; a++){
        for (int b = 0; b < 10 && b <= n-a; b++){
            for (int c = 0; c < 10 && c <= n-a-b; c++){
                if (n-a-b-c >=0 && n-a-b-c < 10) {
                    count++;
                }
            }
        }
    }


    cout << count << endl;

    count = 0;


}



    return 0;

}

C++: #include <iostream>
#include<cmath>
#include<cstring>
#include<cstdio>
#include<map>
#include<algorithm>
#include<vector>
using namespace std;
map <int,int>mp;
void precalculation()
{
    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++){
                    mp[a+b+c+d]++;
                }
            }
        }
    }
}

int main()
{
    for(int i=0;i<=50;i++) mp[i]=0;
    precalculation();
    int n;
    while(scanf("%d",&n)==1){
        printf("%d\n",mp[n]);
    }
    return 0;
}

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

int cnt=0;
int n;

int forf(int t,int ti){
    if(t>n)return 0;
    if(ti<4){
        for(int i=0;i<10;i++){
            forf(t+i,ti+1);
        }
    }else if(t==n)cnt++;
    return 0;
}

int main(){
    while(scanf(" %d",&n)){
        if(n>36){
            cout << '0' << endl;
        }else{
            cnt=0;
            forf(0,0);
            cout << cnt << endl;
        }
    }
    return 0;
}

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

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

C++: #include <iostream>
#include <stdio.h>
#include <string>
#include <math.h>
#include <algorithm>
using namespace std;
int main(){
 int n, a, b, c, d, count = 0;
 
 while(cin >> n){
  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++;
        }
      }
    }
  }
  cout << count << endl;
  count = 0;
 }

 return 0; 
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define P pair<int,int>
#define FOR(I,A,B) for(ll I = ll(A); I < ll(B); ++I)

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