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

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

int main() {
	int n;
	while(scanf("%d",&n)!=EOF){
		int ans=0;
		for(int i=0;i<10;i++){
			for(int j=0;j<10;j++){
				for(int k=0;k<10;k++){
					int l=n-i-j-k;
					if(0<=l&&l<=9)ans++;
				}
				
			}
		}
	cout << ans << endl;
	}

	
	
    	// your code goes here
	return 0;
}

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

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

C++: #include <iostream>

using namespace std;

int main(void){
	int val;
	while(cin >> val)
		cerr << val << endl;

	return 0;
}

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

C++: #include <cstdio>

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

C++: #include<iostream>

using namespace std;
#define RENT 100000
int main(){
	int n, ans;
	int counter = 0;
	while (cin >> n){
		for (int i = 0; i < 10; i++){
			for (int q = 0; q < 10; q++){
				for (int w = 0; w < 10; w++){
					for (int e = 0; e < 10; e++){
						ans = i + q + w + e;
						if (ans == n){
							counter += 1;
						}
					}
				}
			}
		}
		cout << counter << endl;
	}
}

C++: #include <iostream>

using namespace std;

int main() {
    int ans[51] = {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)
                    ans[a + b + c + d] ++;

    int n;
    while (cin >> n) {
        cout << ans[n] << endl;
    }
    return 0;
}

C++: #include<iostream>

using namespace std;
int combine(int *a){
	int max = 0,i = a[0],s=1,j;
	for(j=1;j<4;j++){
		if(i==a[j]){
			s++;
			continue;
		}
		else{
			max = max>s?max:s;
			s=1;
			i = a[j];
		}
	}
	max = max>s?max:s;
	max = 4-max;
	if(max==0)
	return 1;
	else if(max==1)	return 4;
	else if(max==2)	return 6;
	else return 1;
}
int main(){
	int n;
	while(cin>>n){
		int a[4],k=0;
		int left = n/2,right = n-left;
		a[0] = left/2;
		a[1] = left-a[0];
		a[2] = right/2;
		a[3] = right-a[2];
		for(;a[0]>=0;a[0]--){
			for(;a[1]>=0;a[1]--){
				for(;a[2]<=9;a[2]++){
					for(;a[3]<=9;a[3]++){
						int sum = a[0]+a[1]+a[2]+a[3];
						if(sum==n){
							k += combine(a);
						}
					}
				}
			}
		}
		cout<<k<<endl;
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <cmath>
#include <vector>
#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>
#include <cstdio>
#include <algorithm>

using namespace std;

int main() {

	int N,i,j,k,l,count=0;

	while (cin >> N) {
		for (i = 0; i <= 9; i++) {
			for (j = 0; j <= 9; j++) {
				for (k = 0; k <= 9; k++) {
					for (l = 0; l <= 9; l++) {
						if (N == i + j + k + l)
							count++;
					}
				}
			}
		}
		cout << count << endl;
		count = 0;
	}
	
	return 0;

}

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

using namespace std;

main(){
		int l;
		while(cin>>l){
			int o=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==l){
								o=o+1;
							}
						}
					}
				}
			}
			printf("%d\n",o);
		}
}

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

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

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

using namespace std;


// cin >>
// cout <<
int main(){
	int in=0;
	int out=0;
	cin >>in;
	if(cin.eof()!=true){
	    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==in){
					    out++;	
					    }	
				    }
			    }
		    }
	    }
	}
	cout <<out;
	
	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include<stdio.h>
int main(void)
{
	int a,b,c,d,n,N,Na;
	while(scanf("%d",&n)!=EOF){
		N=n/4;
		Na=n%4;
		a=N;
		b=N;
		c=N;
		d=N+Na;
		printf("4\n");
	}
	return 0;
}

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

using namespace std;

int comb(int ball, int bar){
    int temp = 1;
    for (int i = ball + bar; i > ball; --i){
        temp *= i;
    }
    
    int d = 1;
    for (int i = bar; i > 0; --i){
        d *= i;
    }
    return temp / d;
}

int main(){
    int input;
    while (cin >> input){
        cout << comb(input, 3) << endl; 
    }
    
}

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

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

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

int main()
{
	int a;
	while(cin>>a)
	{
	cin>>a;
	int b =0;
	for(int c=0;c<10;c++)
		for(int d =0;d<10;d++)
			for(int e =0;e<10;e++)
				for(int f =0;f<10;f++)
				{
					if
						(c+d+e+f==a)
						b=b+1;
				}
				cout<<b<<endl;
}
				
}