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)
        }
}

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

using namespace std;

int main() {
	int n, ans = 0;
	cin >> n;

	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++;
					}
				}
			}
		}
	}

	cout << ans << endl;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,x,to) for(int i=x;i<to;i++)

int sum(int n){
	int a,b,c,d,ans = 0;
	rep(a,0,10)
	  rep(b,0,10)
	    rep(c,0,10)
	      rep(d,0,10)
	        if(n==a+b+c+d) ans++;
	return ans;
}

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)){
int 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++;
}
}
}
}
printf("%d\n",ans);
}
return 0;
}

C++: #include <stdio.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int cnt[64];

int main() {
    rep (a, 10) rep (b, 10) rep (c, 10) rep (d, 10) cnt[a+b+c+d]++;
    int n;
    while (scanf("%d", &n) != EOF) printf("%d\n", cnt[n]);
    return 0;
}

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

#define f(i) for(int i=0; i<10; ++i)


//0008
int main(){
	int x;

	while(cin >> x){
		int a,b,c,d;
		int count=0;

		f(a)f(b)f(c)f(d){
			if(a+b+c+d == x){
				++count;
			}
		}
		cout << count <<endl;
	}
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#include <iostream>
//#include <stdio.h>
//#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <cmath>

using namespace std;


int main(){

	int n;
	int cnt;

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


	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, total;

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

C++: #include <iostream>

int main(void)
{
	int16_t a = 0;
	int16_t b = 0;
	int16_t c = 0;
	int16_t d = 0;
	int16_t n = 0;
	int16_t count = 0;

	while (std::cin >> n)
	{
		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++;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int a,b,c,d;//nは最大値36
int n;
int ans;//組み合わせの数
int main(){
  while(scanf("%d",&n) !=EOF){
  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 >36)
	    continue;
	  if(a +b + c + d==n){
	    ans++;
	      }
	}
      }
    }
  }
  printf("%d\n",ans);
	      }
  return 0;
}

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

int main(){
  int s,n;
  while(cin>>n){
    s = 0;
    for(int i=9;i>=0;i--){
      if(n-i>27) break;
      for(int j=9;j>=0;j--){
	if(n-i-j>18) break;
	for(int k=9;k>=0;k--){
	  if(n-i-j-k>9) break;
	  if(n-i-j-k>=0) s++;
	}
      }
    }
     cout<<s<<endl;
  }
 
  return 0;
}

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

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;

#define MOD 1000000007
#define REP(i, N) for (int i = 0; i < N; ++i)
#define REP1(i, N) for (int i = 1; i <= N; ++i)
#define RREP(i, N) for (int i = N - 1; i >= 0; --i)
#define ALL(a) a.begin(), a.end()

int main() {
  int n;
  while (cin >> n) {
    int ans = 0;
    REP(a, 10) REP(b, 10) REP(c, 10) {
      int d = n - a - b - c;
      if (0 <= d && d < 10) ans++;
    }
    cout << ans << endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int i = 0; i < (n); i++)
#define repd(i,a,b) for (int i = (a); i < (b); i++)
typedef long long ll;
int main(void)
{
	int n;
	while (cin >> n)
	{
	    int count = 0;
	    rep(i, 10)
	    {
	        rep(j, 10)
	        {
	            rep(k, 10)
	            {
	                rep(l, 10)
	                {
	                    if (i + j + k + l == n) count++;
	                }
	            }
	        }
	    }
	cout << count << endl;
	}
}

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

using namespace std;

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

C++: #include <iostream>

using namespace std;

int main(){
  int n;
  while(cin >> n){
    int res = 0;
    for(int i=0;i<10000;i++){
       int s = 0;
       for(int t=i;t;t/=10) s += t%10;
       if(s==n) res++;
    }
    cout << res << endl;
  }
}

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

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

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

int main(){
	int t = 0;
	int n;
	int a[1000];
	while(cin >> n){
		if(n > 36){
			a[t] = 0;
			continue;
		}
		else if(n > 18){
			n = 36-n;
		}
		a[t] = 1;
		for(int i = n+3; i >=n; i--){
			a[t] = a[t]*i;
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << a[i]/6 << endl;
	}
}

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

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

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

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

}