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<iostream>
using namespace std;

int main() {
	int n,count;
	while ( cin >> n && 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>

using namespace std;

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

int main() {
  int n;
  while (cin >> n) {
    int cnt = 0;
    rep (a, 10) rep (b, 10) rep (c, 10) rep (d, 10) if (a + b + c + d == n) ++cnt;
    cout << cnt << endl;
  }
  return 0;
}

C++: #include<cstdio>

using namespace std;

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

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

int main(){
  int n,res=0,count;
  int a=0,b=0,c=0,d=0;
   cin >>n;
  
   while(1){
     
     for( a = 0 ; a < 10 ; a++){
       //if( (a+b+c+d) == n)res++;

       for( b = 0 ; b < 10 ; b++){
	 //if( (a+b+c+d) == n)res++;
	 for( c = 0 ; c < 10 ; c++){
	   //if( (a+b+c+d) == n)res++;
	   for( d = 0 ; d < 10 ; d++){
	     if( (a+b+c+d) == n)res++;
	     //cout << res <<endl;
	   }

	 }
	 

       }

     }
     count = a;
     if(count > 9)break;
   }

  cout << res<<endl;
  return 0;
}

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

int main(){
	int n, t;
	int out[100] = {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){
							out[t]++;
						}
					}
				}
			}
		}
		t++;
	}
	for(int i = 0; i < t; i++){
		cout << out[t] << endl;
	}
}

C++: #include <stdio.h>

int main( void ){
    int nCount = 0,input;
    scanf( "%d",&input );

    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 == input ) nCount++;
                }
            }
       }
    }

    printf( "%d",nCount );
    return 0;
}

C++: #include<stdio.h>
int main()
{
	int n,i,j,k,t;
	while(~scanf("%d",&n))
	{
	    int cnt=0;
		if(n>36)
		{
			printf("0\n");
			continue;
		}
		for(i=0;i<=9;i++)
			for(j=0;j<=9;j++)
				for(k=0;k<=9;k++)
					for(t=0;t<=9;t++)
						if(i+j+k+t==n)
							cnt++;
		printf("%d\n",cnt);
	}
	return 0;
}

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

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

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





}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.S4I", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		stringstream ss (str );
		int n;
		ss >> n;
		int res = 0;
		rep (a, 10 ) rep (b, 10 ) rep (c, 10 ) rep (d, 10 ){
			if (a + b + c + d == n ){
				res++;
			} // end if
		} // end rep
		printf ("%d\n", res );
	} // end while
	
	return 0;
}

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

int main(){

  int num;
  while(cin >> num){
    int combi = 0;
    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 == num){
	      combi++;
	    }
	  }
	}
      }
    }
    cout << combi << endl;
  }


 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++ ) {
      int l = n - i - j - k;
      if ( l >= 0 && l < 10 && i + j + k + l == n ) cnt++;
    }
      }
    }
    cout << cnt << endl;
  }
  return 0;
}

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

int ans;

void SofI(int num, int n) {
	if (num > n * 9) { return; }
	else if (num < 0) { return; }
	else if (num != 0 && n == 0) { return; }
	else if (num == 0) {
		ans++;
		return;
	}
	else {
		for (int i = 0; i < 10; i++) {
			SofI(num - i, n - 1);
		}
	}

}

int main(void) {
		int num;
		while (cin >> num) {
			if (num == 0) break;
			ans = 0;
			SofI(num, 4);
			cout << ans << endl;
		}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);

    int n;
    while (cin >> n) {
        int cnt = 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)
                            cnt ++;
        cout << cnt << "\n";
    }

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