Go: package main

import (
  "fmt"
)

func main() {
  var a int
  var b int
  for _, err := fmt.Scan(&a); err == nil; _, err = fmt.Scan(&a) {
    b = 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 == a) {
              b++
            }
          }
        }
      }
    }
  fmt.Println(b)
  }
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main(){
	int a,b,c,d,n,x,sum=0;
	for(;;){
		cin>>x;
	for(a=0;a<=9;a++){
		for(b=0;b<=9;b++){
			for(c=0;c<=9;c++){
				for(d=0;d<=9;d++){
					n=a+b+c+d;
					if(x==n){
						sum++;
					}
				}
			}
		}
	}
	cout<<sum<<endl;
	sum=0;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int seach(int n,int m){
	if(m==4){
		return (n==0);
	}
	else{
	int res=0;
	for(int i=0;i<10;i++){
		res+=seach(n-i,m+1);
	}
	return res;
}
}

int main() {
	int n;
	cin >> n;
	cout << seach(n,0) << endl;
	return 0;
}

C++: #include <iostream>

const int N = 9;

int main(void) {
  int n = 0;

  std::string line;

  while (!std::cin.eof()) {
    std::cin >> n;
      
    int count = 0;
    
    for (int i = 0; i <= N; i++) {
      for (int j = 0; j <= N; j++) {
	for (int k = 0; k <= N; k++) {
	  for (int l = 0; l <= N; l++) {
	    if ((i + j + k + l) == n) {
	      count++;
	    }
	  }
	}
      }
    }

    std::cout << count << std::endl;

    std::cin >> n;
  }
   
  return 0;
}

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

return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int n, x, cnt;
    while(cin >> n){
        x = 0;
        for(int i = 0; i < 10; i++){
            for(int j = i; j < 10; j++){
                for(int k = j; k < 10; k++){
                    for(int l = k; l < 10; l++){
                        if(n == i + j + k + l){
                            cnt = 0;
                            if(i == j || i == k || i == l)  cnt++;
                            if(j == k || j == l)    cnt++;
                            if(k == l)  cnt++;
                            if(cnt == 3)   x++;
                            else if(cnt == 2)   x += 4; 
                            else if(cnt == 1){
                                if(i == j && j != k && k != l)  x += 12;
                                else if(j == k && i != j && k != l)  x += 12;
                                else if(k == l && i != j && j != k)  x += 12;
                                else    x += 4;
                            }
                            else    x += 24;
                        }
                    }
                }
            }
        }
        cout << x << endl;
    }
    
    return 0;
}

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

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

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

int main()
{
	int n, cnt;

	while(cin >> n, 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;
	}
}

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


int main()
{
    int N, sum;

    while(std::scanf("%d", &N) != EOF) {
        if (N > 36) std::printf("%d\n", 0);
        else {
            sum = 0;
            for (int i = 0; i <=9; i++) {
                if (i > N) break;
                for (int j = 0; j <= 9; j++) {
                    if (i + j > N) break;
                    for (int k = 0; k <= 9; k++) {
                        if (i + j + k > N) break;
                        for (int l = 0; l <= 9; l++) {
                            if (i + j + k + l > N) break;
                            if (i + j + k + l == N) sum++;
                        }
                    }
                }
            }
            std::printf("%d\n", sum);
        }
    }

    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
	int n,ans=0;
	while(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;
	ans=0;
	}
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
 
int main(){
  int a,b,c,d,n,count = 0;
  while(scanf("%d",&n)!=EOF){
     
    count=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)count++;
    }
      }
    }
    }
    cout << count <<endl;
  }
  return 0;
}

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

int main() {
	int a, b, c, d, n, e = 0;
	for (;;) {
		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 (a + b + c + d == n)e++;
					}
				}
			}
		}
		cout << e << endl;
	}
	return 0;
}

C++: #include <stdlib.h>
#include <string>
#include <vector>
#include <algorithm>
#include <iostream>


/*
	HOME-  Volume0-0008
	Submit Statistics
	 
	PCK 2003
	Sum of 4 Integers
	Time Limit : 1 sec, Memory Limit : 32768 KB
	English version is here

	Sum of 4 Integers

	50 ÈºÌ³Ì® n ðüÍµA0 ` 9 ÌÍÍÌ® a, b, c, d ÌgÅ

	        a + b + c + d = n

	ð½·àÌÌgÝí¹ðoÍ·évOðì¬µÄº³¢B

	á¦ÎAn ª 35 ÌÆ«A(a, b, c, d) Í (8,9,9,9)A(9,8,9,9)A(9,9,8,9)A(9,9,9,8) Ì 4 ÊèÅ·ÌÅA¦Í 4 ÆÈèÜ·B
	Input

	¡Ìf[^Zbgª^¦çêÜ·Bef[^ZbgÉ n ªPsÉ^¦çêÜ·BüÍÌÅãÜÅµÄº³¢B
	Output

	ef[^Zbg²ÆÉAa, b, c, d ÌgÝí¹ÂðPsÉoÍµÄº³¢B
	Sample Input

	35
	1

	Output for the Sample Input

	4
	4
*/

using namespace std;


int main()
{
	string s;
	
	while (getline(cin, s))
	{
		int n;
		sscanf(s.c_str(), "%ld", &n);
		
		int x = 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 (n == (a + b + c + d))
			{
				x++;
			}
		}
		
		printf("%d\n", x);
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n, result = 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) result++;

					}	
				}	
			}
		}
		cout << result << endl;
	}

	return 0;
}