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>
#include <stdio.h>
#include <math.h>
#include <vector>
#include <algorithm>
using namespace std;

int check(int x,int y,int z,int w){

}

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

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

#define REP(i, s, n) for (int i = s; i < n; ++i)
#define rep(i, n) REP(i, 0, n)
#define SORT(c) sort((c).begin(), (c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false

int main()
{
    int n;
    cin >> n;
    int i, j, k;
    while (cin >> n)
    {
        int ans = 0;
        rep(i, 10)
        {
            rep(j, 10)
            {
                rep(k, 10)
                {
                    if (0 <= n - i - j - k && n - i - j - k <= 9)
                    {
                        ans++;
                    }
                }
            }
        }
        cout << ans << endl;
    }
}

C++: #include <iostream>

using namespace std;
int main(){
    int a, b, c, d, i, n[2], jumlah[2];

    for(i=0; i<2; i++){
        jumlah[i] = 0;
        cin>>n[i];
        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[i]){
                                jumlah[i]++;
                            }
                    }
                }
            }
        }
    }
    for(i=0; i<2; i++)
        cout<<jumlah[i]<<endl;

    return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <cstdio>
#include <vector>
#define REP(i, n) for(int i = 0;i < n;i++)
#define REPR(i, n) for(int i = n;i >= 0;i--)
using namespace std;

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

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

C++: #include <iostream>
using namespace std;
int main() {
	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<<endl;
	}
}

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

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

#define REPS(i, a, n) for (int i = (a); i < (n); ++i)
#define REP(i, n) REPS(i, 0, n)
#define RREP(i, n) REPS(i, 1, n + 1)
#define DEPS(i, a, n) for (int i = (a); i >= n; --i)
#define DEP(i, n) DEPS(i, n, 0)

using ll = long long;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using pii = pair<int, int>;
using pis = pair<int, string>;
using psi = pair<string, int>;
using D = double;


int main(){
    int n, ans;

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

        if(n <= 36){
            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>
using namespace std;

int main(){
  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++){
	  int d = n - (a + b + c);
	  if(d >= 0 && d <= 9) cnt++;
	}
      }
    }
    cout << cnt << endl;
  }
}

C++: #include<iostream>
#define REP(i,n) for(int i=1;i<=n;i++)
using namespace std;

#define N 10

int main()
{
    int t;
    while(1)
    {
        cin >> t;
        int ans = 0;
        for(int i=1;i<=9;i++)for(int j=1;j<=9;j++)for(int k=1;k<=9;k++)for(int l=1;l<=9;l++)if((i+j+k+l)==t)ans++;

        cout << ans << endl;
    }

    return 0;
}

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

int serch(int cnt,int 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) cnt++;
	return cnt;
}

int main() {
	int n;
	while(cin>>n){
		int cnt=0;
		if(n<36) cnt=serch(cnt,n);
		cout<<cnt<<endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;
 
int main( ) {
    int n;
    while(cin >> n) {
        int count = 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) {
                            count++;
                        }
                    }
                }
            }
        }
        cout << count << endl;
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main() {
	int n, count;

	while (cin >> n) {
		count = 0;
		if (n <= 36) {
			if (n > 18) n = 36 - n;
			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) {
								count++;
								break;
							}
						}
					}
				}
			}
		}
		cout << count << endl;
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(void) {
	int a, b, c, d, n, res;

	while(!cin.eof()) {
		cin >> n;
		res = 0;
		for(d = 0; d < 10; d++) {
			for(c = 0; c < 10; c++) {
				for(b = 0; b < 10; b++) {
					for(a = 0; a < 10; a++) {
						if(a+b+c+d == n) { res++; }
					}
				}
			}
		}
		if(!cin.eof()) { cout << res << endl; }
	}

	return 0;
}

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

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

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

using namespace std;

int main(){

	int n;
	
	while(1){

		cin >> n;
		if(cin.eof())
			break;

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