Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		cnt := 0
		// 37以上のとき組み合わせは存在しないが省くのめんどくさいのでまとめて計算
		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{
							cnt++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

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

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
	int n, ans;
	ans=0;
	cin >> n;
	rep(i,10) rep(j,10) rep(k,10) rep(l,10) if(i+j+k+l==n) ans++;
	cout << ans << endl;
    return 0;
}

C++: #include <iostream>

using namespace std;

int main(){

  int n;

  while( cin >> n ){

    int cnt = 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) cnt++;
	  }
	}
      }
    }
    cout << cnt << endl;
  }  
}

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

int main(){
int a[5][51];
int b;
int c;
int d;
b=1;
while(b<5){
c=0;
while(c<51){
a[b][c]=0;
c=c+1;}
b=b+1;}

b=0;
while(b<10){
a[1][b]=1;
b=b+1;}

b=2;
while(b<5){
c=0;
while(c<51){
d=0;
while(d<9){
if(c>=d){a[b][c]=a[b][c]+a[b-1][c-d];}
d=d+1;}
c=c+1;}
b=b+1;}
int n;
while(cin >> n){
cout << a[4][n] << endl;}


}

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


int main()
{
	int i, S, n;
	while (cin >> n) {
		i = 0;
		for (S = 1;S <= 9999;S++) {
			if (S/1000+(S-S/1000*1000)/100+(S-S/100*100)/10+S-S/10*10==n)  
				i++;
		}
		cout << i << endl;
	}
    return 0;
}

C++: #include<cstdio>
int main(){for(int i,c,k,n,j;scanf("%d",&n);k=0){for(i=0;i<1e4;c=0){for(j=i++;j>0;j/=10)c+=j%10;c-n?k:k++;}printf("%d\n",k);}}

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

int main()
{
  int n=0;
  while(cin >> n){
    int res=0;
    if(n>36)
      res = 0;
    else if(n==36)
      res = 1;
    else{
      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)
		res++;
	    }
	  }
	}
      }
    }
    cout << res << endl;
  }

  return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstring>

using namespace std;

int main()
{
	int n;
	while(cin >> n)
	{
		int cnt = 0;
		
		for(int i0 = 0; i0 < 10; ++i0)
			for(int i1 = 0; i1 < 10; ++i1) 
				for(int i2 = 0; i2 < 10; ++i2) 
					for(int i3 = 0; i3 < 10; ++i3) 
						if(n == i0 + i1 + i2 + i3) cnt++;
		cout << cnt << endl;
	} 
}

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

int main(){
	int n;

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

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

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

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

int main () {

int n, count = 0;

    cout << "Input n: ";
    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;


    return 0;

}

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

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

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

//using namespace std;


int main(){
    int n=0;

    while(scanf("%d",&n)!=EOF){
        int temp=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){
                            temp++;
                        }
                    }
                }
            }
        }
        printf("%d\n",temp);
    }
}

C++: #include <iostream>
#include <cmath>
#include <cstdio>
#include <algorithm>
#include <vector>
#include <sstream>
#include <string>
#include <cstdlib>
using namespace std;

template <class T> int streamvar(std::istream& in, T& var)
{
    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    in >> var;
    if (in.fail()) {
        cerr << "no var" << endl;
        return 1;
    }
    return 0;
}
template <class T> int streamvec(std::istream& in, std::vector<T> &v)
{
    v.clear();
    string s;

    if (!in) {
        cerr << "invalid istream" << endl;
        return 1;
    }
    getline(in, s);
    if (in.fail()) {
        cerr << "no line" << endl;
        return 1;
    }
    istringstream is(s);
    while (1) {
        T tmp;
        is >> tmp;
        if (is.fail())
            break;
        v.push_back(tmp);
    }
    return 0;
}

int main(void)
{
    int n;
    while (!streamvar(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++) 
                    for (int d = 0; d < 10; d++) 
                        if (a + b + c + d == n)
                        counter++;
        cout << counter << endl;
    }
    return 0;
}

C++: #include <stdio.h>

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

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

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
using namespace std;
#define f(i) for(i=0;i<=9;i++)
int main(){
    int a,b,c,d,n,s,k=0;
    
    while(scanf("%d",&n)!=EOF){
                               k=0;
    f(a)
        f(b)
            f(c)
                f(d){
                if(n==a+b+c+d)
                k++;
                }  
                
                 cout<<k<<endl;                         
    }  
    return 0;
    
}