Go: package main

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

func main() {
	scanner := bufio.NewScanner(os.Stdin)

	for scanner.Scan() {
		count := 0
		for i := 9; i >= 0; i-- {
			numCpy, _ := strconv.Atoi(scanner.Text())
			if numCpy-i >= 0 {
				for j := 9; j >= 0; j-- {
					numCpyi := numCpy - i
					if numCpyi-j >= 0 {
						for k := 9; k >= 0; k-- {
							numCpyj := numCpyi - j
							if numCpyj-k >= 0 {
								for l := 9; l >= 0; l-- {
									numCpyk := numCpyj - k
									if numCpyk-l == 0 {
										count++
										break
									}
								}
							}
						}
					}
				}
			}
		}
		fmt.Println(count)
	}

}

C++: #include <iostream>

using namespace std;

int main(void){
    int num;
    int count;
    while(cin >> num){
        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(num == i + j + k + l) count++;
                    }
                }
            }
        }
        cout << count << "\n";
    }
    cout << endl;
    return 0;
}

C++: #include <stdio.h>

int main(void){
	int n;
	int a,b,c,d;
	
	int 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++;
						}
					}
				}
			}
		}
		printf("%d\n",count);
		count = 0;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<sstream>
#include<iomanip>
#include<cstdlib>
#include<cmath>
#include<cstdio>
using namespace std;

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

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>
#include<algorithm>
#include<string>
#include<vector>

#define FOR(i, a) for(int i=0;i<(int)a;++i)
typedef long long ll;
using namespace std;

void solver() {
    int N;
    while (cin >> N) {
        int ans = 0;
        FOR(a, 10)FOR(b, 10)FOR(c, 10) {
                    int d = N - (a + b + c);
                    if (d >= 0 && d < 10) {
                        ans++;
                    }
                }
        cout << ans << endl;
    }
}

int main() {
    solver();
    return 0;
}

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

int main() {
	int n;
	while (cin >> n) {
		int c = 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++) {
						int m = i + j + k + l;
						if (m == n) c++;
					}
				}
			}
		}

		cout << c << endl;
	}
}

C++: #include<iostream>
using namespace std;
int x,ans;
int main(){
while(1){
ans=0;
cin>>x;
if(x<=0)return 0;
for(int i=0;i<10;i++){
for(int j=0;i<10;j++){
for(int k=0;k<10;k++){
if(x-(i+j+k)<10){
ans++;
}
}
}
}
cout<<ans;
}
return 0;
}

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

int main(){
  int s,h = 0;
  int n,t = 0;
  cin>>n>>t;

  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){
     s++;
   }
if(a+b+c+d ==t){
     h++;
   }
 }
 }
 }
  }
  cout<<s<<endl;
  cout<<h<<endl;

  return 0;
}

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

using namespace std;

int main() {
	int n, ans = 0;
	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;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,x,to) for(int i=x;i<to;i++)

int sum(int n){
	int a,b,c,d,ans = 0;
	rep(a,0,10)
	  rep(b,0,10)
	    rep(c,0,10)
	      rep(d,0,10)
	        if(n==a+b+c+d) ans++;
	return ans;
}

int main() {
	int n;
	while(cin >> n)
		cout << sum(n) << endl;	
	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main()
{
int n;
while(scanf("%d",&n)){
int ans=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)ans++;
}
}
}
}
printf("%d\n",ans);
}
return 0;
}

C++: #include <stdio.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)

int cnt[64];

int main() {
    rep (a, 10) rep (b, 10) rep (c, 10) rep (d, 10) cnt[a+b+c+d]++;
    int n;
    while (scanf("%d", &n) != EOF) printf("%d\n", cnt[n]);
    return 0;
}

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

#define f(i) for(int i=0; i<10; ++i)


//0008
int main(){
	int x;

	while(cin >> x){
		int a,b,c,d;
		int count=0;

		f(a)f(b)f(c)f(d){
			if(a+b+c+d == x){
				++count;
			}
		}
		cout << count <<endl;
	}
	return 0;
}

C++: //#define _USE_MATH_DEFINES
#include <iostream>
//#include <stdio.h>
//#include <iomanip>
//#include <vector>
//#include <string>
//#include <algorithm>
//#include <functional>
//#include <cmath>

using namespace std;


int main(){

	int n;
	int cnt;

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


	return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
	int n, total;

	while (cin >> n){
		total = 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){
							total++;
						}
					}
				}
			}
		}
		cout << total << endl;
	}
}

C++: #include <iostream>

int main(void)
{
	int16_t a = 0;
	int16_t b = 0;
	int16_t c = 0;
	int16_t d = 0;
	int16_t n = 0;
	int16_t count = 0;

	while (std::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++;
						}
					}
				}
			}
		}
		std::cout << count << std::endl;
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
using namespace std;
int a,b,c,d;//nは最大値36
int n;
int ans;//組み合わせの数
int main(){
  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 >36)
	    continue;
	  if(a +b + c + d==n){
	    ans++;
	      }
	}
      }
    }
  }
  printf("%d\n",ans);
	      }
  return 0;
}

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

int main(){
  int s,n;
  while(cin>>n){
    s = 0;
    for(int i=9;i>=0;i--){
      if(n-i>27) break;
      for(int j=9;j>=0;j--){
	if(n-i-j>18) break;
	for(int k=9;k>=0;k--){
	  if(n-i-j-k>9) break;
	  if(n-i-j-k>=0) s++;
	}
      }
    }
     cout<<s<<endl;
  }
 
  return 0;
}