Go: package main

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

var scanner = bufio.NewScanner(os.Stdin)

func nextString() string {
	scanner.Scan()
	return scanner.Text()
}

func nextInt() (int, error) {
	return strconv.Atoi(nextString())
}

func main() {
	scanner.Split(bufio.ScanWords)

	counts := map[int]int{}
	for i := 0; i < 10; i++ {
		for j := 0; j < 10; j++ {
			for k := 0; k < 10; k++ {
				for l := 0; l < 10; l++ {
					s := i + j + k + l
					if s <= 50 {
						counts[s]++
					}
				}
			}
		}
	}
	// fmt.Println(counts)
	for {
		n, err := nextInt()
		if err != nil {
			break
		}
		cnt, ok := counts[n]
		if ok {
			fmt.Println(cnt)
		} else {
			fmt.Println(0)
		}
	}
}

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

int main()
{
	int n;
	int ans = 0;
	
	while(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 <bits/stdc++.h>
using namespace std;

#define int				long long
#define FOR( i, m, n )  for( int (i) = (m); (i) < (n); (i)++ )
#define FORE( i, m, n ) FOR( i, m , n + 1 )
#define REP( i, n )     FOR( i, 0, n )
#define REPE( i, n )	FOR( i, 0, n + 1 )
#define REPR( i, m )	for( int (i) = (m); (i) >= 0; (i)-- )
#define REPONE( i, n )	FOR( i, 1, n + 1 )
#define ALL( a )        (a).begin(), (a).end()             
#define MP( a, b )		make_pair( (a), (b) )
#define fi				first
#define se				second

template<class T>bool chmax( T& a, const T& b ) { if( a < b ) { a = b; return 1; } return 0; }
template<class T>bool chmin( T& a, const T& b ) { if( a > b ) { a = b; return 1; } return 0; }

const int INF = 1e9;
const int MOD = 1e9 + 7;

int gcd( int a, int b ) {
	if( a % b == 0 ) return b;
	else			 gcd( b, a % b );
}

signed main() {
	int n;
	while( cin >> n ) {
		int cnt = 0;
		REP( i, 10 ) {
			REP( j, 10 ) {
				REP( k, 10 ) {
					REP( l, 10 ) {
						if( n == i + j + k + l ) cnt++;
					}
				}
			}
		}
		cout << cnt << endl;
	}
}

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

using namespace std;

int main() {
	int num[4], n;
	int count = 9;
	int point[10] = {0};

	cin >> n;

	for(int i = 0; i < 4; i++) {
		if(n - count >= 0) {
			n -= count;
			num[i] = count;
		}
		else {
			count--;
			i--;
		}
	}


	for(int i = 0; i < 4; i++) {
		point[num[i]]++;
	}

	int c = 0;

	for(int i = 1; i < 10; i++) {
		if(point[i] != 0) {
			c++;
		}

	}
	int ans = 1;

	if(c == 4) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
	}
	else if(c == 3) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 2;
	}
	else if(c == 2) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= 6;
	}
	else if(c == 1) {
		for(int i = 4; i >= 1; i--) {
			ans *= i;
		}
		ans /= ans;
	}

	cout << ans << endl;
}

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

int n;
int ans;


void saiki(int x, int c)
{
	if(x == 0 && c == 5)
		ans++;

	for(int i = 9; i >= 0; i--){
		if(x - i >= 0 && c <= 4)
			saiki(x-i,c+1);
	}

}

int main(void)
{

	int d[20];

	int c = 0;


	while(cin >> n, n){
		ans = 0;
		saiki(n,1);
		cout << ans << endl;
	}


	return 0;
}

C++: #include<iostream>
#include<string.h>
#include<math.h>
#include<cstring>
using namespace std;

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

    return 0;
}

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

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

C++: #include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <vector>
#include <algorithm>
#include <utility>
#include <queue>
int n;
using namespace std;
int main(){
	std::ios::sync_with_stdio(false);
	while(cin>>n){
		
		int counter=0;
		for(int i=0;i<=9;i++){
			for(int k=0;k<=9;k++){
				for(int j=0;j<=9;j++){
					for(int p=0;p<=9;p++){
						if(n==i+k+j+p){
							counter++;
							//break;
					}
				}
			}
		}
	}
		cout<<counter<<"\n";
		
	}
	

	return 0;
}

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

int main(void){
     int n,i=0;

     while(cin >> n,!cin.eof()){
	  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(n == a+b+c+d){
				   i = i+1;
			      }
			 }
		    }
	       }
	  }
     }

     cout << i << endl;

     return 0;
}

C++: #include <iostream>

int main(void){

int input=0;
int output=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++){
			int abcd=a+b+c+d;
				if(abcd==input){
					output++;
				}
			}
		}
	}

	cout << output;
}

C++: #include <iostream>

using namespace std;

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

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

#define REP(i,n) for(int i=0;i<n;++i)
#define rep(n) REP(i,n)


int main()
{
	int n; 
	while(cin>>n)
	{
		int ans=0;

		REP(i,10) REP(j,10) REP(k,10)
		{
			if( (i+j+k)<=n && (i+j+k)+9>=n ) ++ans;
		}

		cout<<ans<<endl;
	}

	return 0;
}

C++: //52
#include<iostream>

using namespace std;

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

C++: //http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0008
#include <iostream>
using namespace std;
int main() {
	cin.tie(0); 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 << endl;
	}
}

C++: #include <iostream>
#include <string>
#include <stack>
#include <math.h>
#include <algorithm>
#include <cstdlib>
#include <ctime>
#include <vector>

using namespace std;





int main()
{
	int n;
	int sum;
	int k[19];//k[i]???i?????????????¶?????????§??????????????¨?????????????????????
	while (cin >> n) {
		sum = 0;
		if (n > 36) {
			cout << "0" << endl;
			break;
		}
		else{
			
			for (int i = 0; i < 19; i++) {
				if (i < 10) {
					k[i] = i + 1;
				}
				else {
					k[i] = 19 - i;
				}
			}
			for (int i = max({0,n-18}); i <= min({ 18,n }); i++) {
				sum += k[i] * k[n - i];
			}
		}
		cout << sum << endl;
	}





}