Go: package main

import "fmt"

func main() {
	var n int

	for {
		result := 0
		_, err := fmt.Scanf("%d", &n)
		if err != nil {
			return
		}

		if n <= 36 {
			for a := 9; a >= 0; a-- {
				for b := 9; b >= 0; b-- {
					for c := 9; c >= 0; c-- {
						for d := 9; d >= 0; d-- {
							if a+b+c+d == n {
								// fmt.Println(a, b, c, d)
								result++
							}
						}
					}
				}
			}
		}
		fmt.Println(result)
	}
}

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

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

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

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define int long long
using namespace std;
typedef pair<int, int> P;

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

C++: 
#include <iostream>

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
#include <cstdlib>

using namespace std;

int main()
{
	int n;

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

	return 0;
}

C++: import java.util.*;class Main{public static void main(String[]a){new Main();}public Main(){f(3,0);for(Scanner s=new Scanner(System.in);s.hasNext();){Object i=m.get(s.nextInt());System.out.println(i==null?0:i);}}Map<Integer,Integer>m=new HashMap<Integer,Integer>();void f(int n,int s){for(int i=0,r;i<10;i++){r=s+i;if(n<1)m.put(r,m.get(r)!=null?m.get(r)+1:1);else f(n-1,r);}}}

C++: #include <iostream>

int combinations_of_sum_of_4_integers(int n);

int main(int argc, char** argv) {
	int n;

	while(std::cin >> n) {
		std::cout << combinations_of_sum_of_4_integers(n) << std::endl;
	}
}

int combinations_of_sum_of_4_integers(int n) {
	int i, j, k, l, result;
	result = 0;
	if(n > 36) {
		return 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) {
						result += 1; 
					}
				}
			}
		}
	}
	return result;
}

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

int main() {
	// your code goes here
	int n;
	while(cin>>n){
	int count=0;
		for(int i=9; i>=0; i--){
			for(int j=9; j>=0; j--){
				for(int k=9; k>=0; k--){
					for(int l=9; l>=0; l--){
						if(i+j+k+l==n)count++;
					}
				}
			}
		
	
	}
	cout<<count<<endl;
	}
	return 0;
}

C++: #include<stdio.h>
#include<iostream>

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

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

int main()
{
	int n,nn=0;
	int countdata [100];

	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++;
						}
					}
				}
			}
		}
		countdata[nn] = count;
		nn++;
	}
	for (int a=0;a<nn;a++)
		cout << countdata[a] << 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 <stdio.h>

int main(void){
	int t[100];
	int n = 0;
	int c = 0;

	for(int i=0;i<=9;++i){
		for(int j=0;j<=9;++j){
			t[i*10+j] = i+j;
		}
	}

	while(scanf("%d", &n) != EOF){
		c = 0;
		for(int i=0;i<100;++i){
			for(int j=0;j<100;++j){
				if(t[i]+t[j] == n){
					c++;
				}
			}
		}
		printf("%d\n", c);
	}
	return 0;
}

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

using namespace std;

int solve(const int n) {
	set< vector<int> > s;
	vector<int> v(4);
	for (v[0] = 0; v[0] < 10; v[0]++)
		for (v[1] = 0; v[1] < 10; v[1]++)
			for (v[2] = 0; v[2] < 10; v[2]++)
				for (v[3] = 0; v[3] < 10; v[3]++) {
					int sum = 0;
					for (int i = 0; i < 4; i++) sum += v[i];
					if (sum == n) {
						s.insert(v);
						break;
					}
				}
	return s.size();
}

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (cin) {
		int n;
		cin >> n;
		cout << solve(n) << endl;
	}
	return 0;
}

C++: #include <cmath>
#include <cstdlib>
#include <cstdio>

#include <iostream>
#include <vector>
#include <algorithm>
#include <utility>

int main() {
  long n;
  long last;
  long count;

  while( std::cin >> n ) {
    count = 0;
    for(int i = 0; i <= 9; ++i) {
      for(int j = 0; j <= 9; ++j) {
	for(int k = 0; k <= 9; ++k) {
	  last = n - (i + j + k);
	  if( 0 <= last and last <= 9 ) {
	    ++count;
	  }
	}
      }
    }
    
    std::cout << count << std::endl;
  }

  return 0;
}

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

int main(){
	int n;
	cin>>n;
	for(int i=1;i<=n;i++){
		int a,b,c;
		cin>>a>>b>>c;
		if(a*a+b*b==c*c || a*a==b*b+c*c || a*a+c*c==b*b){
			cout<<"YES"<<endl;
		}
		else cout<<"NO"<<endl;
	}
}

C++: #include <iostream>

using namespace std;

int main(void) {
  int n = 0;
  cin >> n;

  int num = 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) num++;
        }
      }
    }
  }

  cout << num << '\n';

  return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<string>
using namespace std;
int main(){
	
	int n;
	while(cin>>n){
	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 x=0;x<10;x++){
					if(i+j+k+x==n){count++;}
				}
			}
		}
	}
		cout<<count<<endl;
	}
			
	return 0;
	}

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

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