Go: package main
import (
	"fmt"
	"os"
	"strconv"
	"bufio"
)

var sc = bufio.NewScanner(os.Stdin)

func main(){
	for sc.Scan(){
		n := nextInt()
		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++
						}
					}
				}
			}
		}
		fmt.Println(cnt)
	}
}

func next()string{
	//sc.Scan()
	return sc.Text()
}

func nextInt()int{
	a, _ := strconv.Atoi(next())
	return a
}

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

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<iomanip>
using namespace std;
#define pi 3.141592653589793283462
int main(){
    int c;
	int d=0;
	while (cin>>c)
	{
		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==c)
						   d++;
					}
				}
			}
		}
		cout<<d<<endl;
		d=0;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;
int N;
int Sum = 0;
int main()
{
    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(a+b+c+d == N)
                    {
                        Sum++;
                    }
                }
            }
        }
    }   
    }



    cout << Sum << endl;
}

C++: #include<iostream>

using namespace std;

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

C++: #include <iostream>
using namespace std;
int main(){
int n;
while(cin>>n){
int ans=0;
int a=0,b=0,c=0,d=0;
if(n<=36){
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(n==a+b+c+d) {ans=ans+1;}
cout<<ans<<endl;}
else if(n>36){ans=0;
cout<<ans<<endl;}}
return 0;
}

C++: #include <stdio.h>

int main(void)
{
	int n;
	int i, j, k, l;
	int ans = 0;
		
	while(scanf("%d", &n) != EOF){
			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){ ans += 1; }
						}
					}
				}
			}
			
			printf("%d\n", ans);
		}
		return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n;
	while ( cin >> n ) {
		int count;
		if (n>36) count = 0;
		else if (n<=9) count = ((n+1)*(n+2)*(n+3))/6;
		else if (n<=18) count = ((n+1)*(n+2)*(n+3))/6 - 4*((n-9)*(n-8)*(n-7))/6;
		else if (n<=27) count = ((37-n)*(38-n)*(39-n))/6 - 4*((27-n)*(28-n)*(29-n))/6;
		else count = ((37-n)*(38-n)*(39-n))/6;
		
		cout << count << endl;
	}
	
	return 0;
}

C++: #include<iostream>
#include<stdio.h>
int main(){

	int a,b,c,d,n,i;

	while(std::cin>>n&&n){
	i=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){
						i++;
			

						}
					}
				}
			}
		}

	std::cout<<i<<std::endl;
}
	return 0;
	}

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

using namespace std;

int main()
{
	int n, a, b, c, d;
	double  ans = 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(a + b + c + d == n)
									ans ++;
							}
					}
			}
	}

	cout << ans << endl;

	return 0;
}

C++: #include <iostream>

using namespace std;


int main()
{

	int n,count;
	int a,b, c,d;
	while(cin >> n){

		//a>=b>=c>=dと仮定
		count = 0;
		for( a = 0; a < 10; a++ ) {
			if ( a > n ) 
				continue;
			for( b = 0; b < a+1; b++ ) {
				if( a + b > n )
					continue;
				for( c = 0; c < b+1; c++ ) {
					if( a + b + c > n ) 
						continue;
					d = n - a - b- c;
					if( d > c )
						continue;
				if( a == d )//全部同じ
					count += 1;
				else if( a == c || b == d)//１つ異なる
					count += 4;
				else if( a == b && c == d )//2つずつ同じ
					count += 6;
				else if( a == b || b == c || c == d )//2つ同じ
					count += 12;
				else
					count += 24;
				}
			}
		}
		cout << count << endl;

	}

	return 0;
}

C++: #include<iostream>

using namespace std;

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

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
	int n;
	while(cin>>n){
		int 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 <stdlib.h>

int main()
{
    int n,a,b,c,d,i,j,k,l,cnt=0;
    scanf("%d",&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 (i+j+k+l==n)
                        cnt=cnt+1;
                    else
                        continue;
                }
            }
        }
    }
    printf("%d\n",cnt);
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    for (int i = 0; i = 10; i++) {
      for (int j = 0; j = 10; j++) {
        for (int k = 0; k = 10; k++) {
          if (0 <= n - i - j - k && n - i - j - k < 10) cnt++;
        }
      }
    }
    cout << cnt << endl;
  }
}

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

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

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

using namespace std;

int n, s;
int dp[10][100][10];
int solve(int i, int j, int k);

int main(void){
	
	while(cin >> n >> s){
		if(n == 0 && s == 0){break;}
		fill_n(**dp,10*100*10,-1);
		cout << solve(0,0,10) << endl;
	}
}

int solve(int now, int sum, int b1){
	if(now == n){
		if(sum == s){return 1;}
		else return 0;
	}
	if(dp[now][sum][b1] != -1){return dp[now][sum][b1];}
	int t = 0;
	for(int i = 0; i < 10; i++){
		if(b1 != 10 && b1 >= i){break;}
		t += solve(now+1, sum + i, i);
	}
	return dp[now][sum][b1] = t;
}

C++: #include <cstdio>

using namespace std;
 
int main() {
	int n;
	int i, j, k, m;
	int counter;
	
	while (scanf("%d", &n) != EOF) {
	    counter = 0;
	    
	    for (i = 0; i < 10; i++) {
	        for (j = 0; j < 10; j++) {
	            for (k = 0; k < 10; k++) {
	                for (m = 0; m < 10; m++) {
	                    if ((i + j + k + m) == n) counter++;
	                }
	            }
	        }
	    }
	    
	    printf("%d\n", counter);
	}
	
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
int n;
while(cin>>n){
int ans=0;
int a,b,c,d;
if(n<=36){
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(n==a+b+c+d) {ans=ans+1;}
cout<<ans<<endl;}
else if(n>36){ans=0;
cout<<ans<<endl;}}
return 0;
}