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++: #include <iostream>

using namespace std;

int main()
{
        int n;

        while (cin >> n) {
                int ans = 0;
                if (n <= 9) {
                        for (int a = 0; a <= n; a++)
                                for (int b = 0; b <= n; b++)
                                        for (int c = 0; c <= n; c++)
                                                for (int d = 0; d <= n; d++)
                                                        if (a + b + c + d == n)
                                                                ans++;
                }
                else {
                        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>
#include <cmath>
#include <algorithm>
using namespace std;

int f(int n){
    if(n > 36) return 0;
    int a[4], count = 0;

    for(a[0] = 0;    a[0] <= 9; a[0]++){
    for(a[1] = a[0]; a[1] <= 9; a[1]++){
    for(a[2] = a[1]; a[2] <= 9; a[2]++){
    for(a[3] = a[2]; a[3] <= 9; a[3]++){
        if(a[0] + a[1] + a[2] + a[3] == n){
            do {
                count++;
            }while(next_permutation(a, a+4));
        }
    }}}}
    return count;
}

int main(){
    int n;
    while(cin >> n){
        cout << f(n) << endl;
    }
    return 0;
}

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

int main(void)
{
	int n;
	char buf[256];
	
	
	while (fgets(buf, 256, stdin) != NULL){
		int ans;

		n = atoi(buf);
		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<iostream>
#include<vector>
#include<cstdio>
#include<algorithm>

using namespace std;

int main(){
  int num,count;
  vector<int> v(4,0) ;
  while(cin >> num){
    count = 0;
    for(int i = 0; i < 10; ++i){
      for(int j = i; j < 10; ++j){
        for(int k = j; k < 10; ++k){
          for(int l = k; l < 10; ++l){
            if(i + j + k + l == num){
              v[0] = i,v[1] =j,v[2] = k;v[3] = l ;
            }
          }
        }
      }
    }
    do{
      ++count ;
    }while(next_permutation(v.begin(),v.end())) ;
    cout << count << endl;
  }
  return 0;
}

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

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

    int n,m;
    while (std::cin >> n) {
        m = 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){
                            m += 1;
                        }
                    }
                }
            }
        }
        std::cout << m << std::endl;
    }
    return EXIT_SUCCESS;
}

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

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

     return 0;
}

C++: #include<stdio.h>

int main(){
  int n,n1,n2,n3,n4;
  int i,j,k,l;
  while(scanf("%d", &n) != EOF){
    int m=0;
    for(i=0;i<10;i++){
      n1=n-i;
      for(j=0;j<10;j++){
	n2=n1-j;
	for(k=0;k<10;k++){
	  n3=n2-k;
	  for(l=0;l<10;l++){
	    n4=n3-l;
	    
	    if(n4==0)
	      m++;
	  } 
	} 
      } 
    }
    printf("%d\n",m);
  }
  return 0;
}

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

void solve(int n) {
	int a, b, c, d, ans = 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) ans++;
				}
			}
		}
	}
	printf("%d\n", ans);
}

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

C++: #include<iostream>
#include<cstdio>
#include<algorithm>
#include<cstring>
using namespace std;
int main(){
	int n;
	cin>>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++){
					for(int d=0;d<10;d++){
						if(a+b+c+d==n)count++;
					}
				}
			}
		}
		cout<<count<<endl;
	}
    return 0;
}

C++: #inlcude<cstdio>

int solve(int a,int b){
 
 if(b==4){
  if(a==0) return 1;
  else return 0; 
 }
 else{
  int res=0;
  for(int i=0;i<=a&&i<10;i++){
   res+=solve(a-i,b+1);
  }
  return res;
 }
}

int main(){
 int n;
 while(~scanf("%d",&n)){
  printf("%d\n",solve(n,0));
}
return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>
#include <sstream>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <stack>
#include <queue>
#include <algorithm>
#include <complex>
#include <iterator>
using namespace std;

typedef pair<int, int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;

#define all(c) (c).begin(), (c).end()
#define rall(c) (c).rbegin(), (c).rend()
#define tr(c, i) for(auto i = (c).begin(); i != (c).end(); i++)
#define rtr(c, i) for(auto i = (c).rbegin(); i != (c).rend(); i++)
#define repfn(i, a, cont, next) \
  for(auto i = (a); [=](){return(cont);}(); i = [=](){return(next);}())
#define repby(i, a, b, step) repfn(i, a, i < b, i + step)
#define repab(i, a, b) repby(i, (a), (b), 1)
#define rep(i, n) repab(i, 0, (n))
#define pb push_back
#define sz(c) int((c).size())

int main(int argc, char **argv)
{
  int n;
  vi v;
  typedef tuple<int, int, int, int> ti4;
  set<ti4> accm;

  while (cin >> n) {
    repab (a, 0, 10) {
      repab (b, 0, 10) {
        repab (c, 0, 10) {
          repab (d, 0, 10) {
            if (a + b + c + d == n) {
              accm.insert(ti4(a, b, c, d));
            }
          }
        }
      }
    }
    cout << sz(accm) << endl;
    accm.clear();
  }
  return 0;
}

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

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

  cout << m << endl;

  return 0;
}

C++: #include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
#include <cfloat>
#include <map>
#include <utility>
#include <set>
#include <iostream>
#include <memory>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <sstream>
#include <complex>
#include <stack>
#include <queue>
using namespace std;
static const double EPS = 1e-5;
typedef long long ll;
#define FOR(i,n) for(i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)

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