Go: package main

import (
	"bufio"
	"fmt"
	"os"
	"strconv"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;


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

    return 0;
}

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

int main(){
  int n;
  while(cin >> n) {
    if (n % 4 == 0) cout << 1 << endl;
    else cout << 4 << endl;
  }
  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<string>
#include<set>
#include<map>
#include<queue>
#include<vector>
using namespace std;

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

	for(int a=0;a<=9;a++)
		for(int b=0;b<=9;b++)
			for(int c=0;c<=9;c++){
				if(a+b+c>n)break;
				if(n-(a+b+c)>9)continue;
				cnt++;
			}

	cout<<cnt<<endl;
	return 0;
}

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