Go: package main

import (
        "fmt"
)

func main() {
        var n int
        for {
                _, err := fmt.Scanf("%d", &n)
                if err != nil {
                        break
                }
                cnt := 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 {
                                                        cnt++
                                                }
                                        }
                                }
                        }
                }
                fmt.Printf("%d\n", cnt)
        }
}

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

C++: #include<bits/stdc++.h>
typedef long long ll;
using namespace std;
int INF = 1e9;
int MOD = 1e9+7;
main(){
    int N,cnt = 0;
    while(1){
        cin >> N;
        for(int i = 0;i <= 9;i++)for(int j = 0;j <= 9;j++)for(int k = 0;k <= 9;k++)
        if(N-i-j-k >= 0 && N-i-j-k <= 9)cnt++;
        cout << cnt << endl;
    }
}

C++: #include<iostream>

using namespace std;
int n;
int bfs(int now,int d){
	int ans=0;
	if(d==4){
	if(now==n)return 1;
	else return 0;
	}
	else{
	for(int i=0;i<10;i++)ans+=bfs(now+i,d+1);
	}
	return ans;
}

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

C++: #include<iostream>
using namespace std;
int n,num;
void dfs(int sum,int dept){
  if(dept==4){
    if(sum==n)
      num++;
    return;
  }
  for(int i=0;i<=9;i++)
    dfs(sum+i,dept+1);
}
int main(){
  while(cin>>n){
    num=0;
    for(int i=0;i<=9;i++)
      dfs(i,1);
    cout<<num<<endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int pair[100];
  int input;
  
  for(int i = 0; i < 10; i++)
    for(int j = 0; j < 10; j++)
      pair[i * 10 + j] = i + j;


  while(cin >> input){
    int count = 0;
    if(input > 36){
      continue;
    } else {
      for(int i = 0; i < 100; i++){
	int cd = input - pair[i];
	
	if(cd <= 18){
	  for(int j = 0; j < 100; j++) if(pair[j] == cd)
	      count++;
	}
      }
    }
    
    cout << count << endl;
  }

  return 0;
}

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;

}