Go: package main

import "fmt"

var count int

func main() {
	var inputNum int
	for {
		fmt.Scanf("%d", &inputNum)
		fmt.Printf("%d\n", calcA(inputNum))
		count = 0
	}
}

func calcA(input int) int {
	for i := 0; i <= 9; i++ {
		calcB(input, i)
	}
	return count
}

func calcB(input, a int) {
	for i := 0; i <= 9; i++ {
		calcC(input, a, i)
	}
}

func calcC(input, a, b int) {
	for i := 0; i <= 9; i++ {
		calcD(input, a, b, i)
	}
}

func calcD(input, a, b, c int) {
	for i := 0; i <= 9; i++ {
		if a+b+c+i == input {
			count++
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;

typedef long long int ll;
typedef pair<int, int> pii;
typedef vector<int> vi;
typedef vector<pair<int, int> > vii;
#define rrep(i, m, n) for(int (i)=(m); (i)<(n);  (i)++)
#define  rep(i, n)    for(int (i)=0; (i)<(n);  (i)++)
#define  rev(i, n)    for(int (i)=(n)-1; (i)>=0; (i)--)
#define vrep(i, c)    for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++)
#define  ALL(v)       (v).begin(), (v).end()
#define mp            make_pair
#define pb            push_back
template<class T1, class T2> inline void minup(T1& m, T2 x){ if(m>x) m=static_cast<T2>(x); }
template<class T1, class T2> inline void maxup(T1& m, T2 x){ if(m<x) m=static_cast<T2>(x); }

#define INF 1000000000
#define MOD 1000000009
#define EPS 1E-9

int n;
int res;

int main()
{

  while(cin >> n){
    res = 0;
    rep(a,10) rep(b,10) rep(c,10) rep(d,10) if(a+b+c+d==n) res += 1;
    cout << res << endl;
  }

  return 0;
}

C++: #include <iostream>
using namespace std;
int h[51];
int main() {
 int a,b,c,d,n,j=0,m;
 for (m=0; m<10000; m++) {
	 a=m/1000; b=(m-a*1000)/100;
	 c=(m-a*1000-b*100)/10; d=m-a*1000-b*100-c*10;
     h[a+b+c+d]++;
 }
 while(cin >> n) cout << h[n] << endl;
 return 0;
}

C++: #include <iostream>
#include <stdio.h>
#define _USE_MATH_DEFINES
#include <cmath>
#include<algorithm>
using namespace std;
int main()
{
    int n;
    while(cin>>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++;
                    }
                }
            }
        }
            
        cout<<ans<<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++;
				}
			}
		}
	}
	cout << ans << endl;
	return 0;
}

C++: #include<stdio.h>
    int main(void){
    int i,j,k,l,n,m,cut;
    while(1){
    cut=0;
    scanf("%d",&n);
    if(n=='EOF')break;
    for(i=0;i<10;i++){
        for(j=0;j<10;j++){
            for(k=0;k<10;k++){
                for(l=0;l<10;l++){
                    //m=i+j+k+l;
                    if(n==i+j+k+l){
                        cut++;
                    }
                }
            }
        }
    }
        printf("%d",cut);
    }
    return 0;
    }

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

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

}

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

using namespace std;

int memo[100] = {0};

int main() {
	map<int, bool> m;
	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) {
					vector<int> v;

					v.push_back(a);
					v.push_back(b);
					v.push_back(c);
					v.push_back(d);

					sort( v.begin(), v.end() );

					int code = 0;
					for (int i = 0, k = 1; i < v.size(); ++i, k *= 10)
						code += v[i] * k;

					if ( !m[code] ) ++memo[a+b+c+d];
					else m[code] = true;
				}

	int n;
	while (scanf("%d", &n) != EOF) {
		cout << memo[n] << endl;
	}
}

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

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

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

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

int main()
{
	solve();
	return(0);
}

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

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

C++: #include<iostream>
using namespace std;
int main(){
  int n;
  while(cin >>n){
    int ans = 0;
    for(int i=0; i<10; i++)
      for(int j=0; j<10; j++)
	for(int k=0; k<10; k++)
	  if(n-i-j-k>=0 && n-i-j-k<10) ans++;
    cout <<ans<<endl;
  }
  return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
	int a,b=0;
	while(cin>>a){
		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==a) b++;
					}
				}
			}
		}
	}
	cout<<b<<endl;
	return 0;
}

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

using namespace std;

int main(void)
{
	int n;
	while(scanf("%d",&n) != EOF){
		if(n>36)
			cout<<"0"<<endl;
		else
			cout<<"4"<<endl;
	}
}

C++: #include <iostream>
using namespace std;
int main(void){
    int a, b, c, d;
    int n;
    int sum = 0; //条件を満たす組み合わせの数

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

C++: #include <bits/stdc++.h>
using namespace std;

int main() {
	ios :: sync_with_stdio(false);
	int n;
	while(cin >> n) {
		int 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 == n)
							ans ++;
		cout << ans << '\n';
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int N;
 
int solve(){
    int ans = 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){
                    int tmp = i + j + k + l;
                    if(tmp == N) ans++;
                }
            }
        }
    }
    return ans;
}
 
int main(){
    while(cin >> N){
        int ans = solve();
        cout << ans << endl;
    }
}

C++: #include<iostream>
using namespace std;
#define RENT 100000
int main(){
    int n;
    while(cin>>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++;
                    }
                }
            }
        }
         
        cout<<ans<<endl;
    }
}

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

int main(){
  int n;
  cin >> n;

  if (n % 4 == 0) cout << 1 << endl;
  else cout << 4 << endl;

  return 0;
}