Go: package main

import (
	"fmt"
	"sort"
)

// TriangleKind kind of triangle
type TriangleKind int

const (
	// Nothing not triangle
	Nothing TriangleKind = iota
	// RightTriangle the right triangle
	RightTriangle
	// SharpTriangle the sharp triangle
	SharpTriangle
	// ObtuseTriangle the obtuse triangle
	ObtuseTriangle
) // const for Triangle kind

type result struct {
	rTriangle int
	sTriangle int
	oTriangle int
}

func (res *result) String() string {
	return fmt.Sprintf("%d %d %d %d", res.rTriangle+res.sTriangle+res.oTriangle, res.rTriangle, res.sTriangle, res.oTriangle)
}

func checkTriangleType(a int, b int, c int) TriangleKind {
	p := []int{a, b, c}
	sort.Sort(sort.IntSlice(p))
	if !(p[0]+p[1] > p[2] && p[1]+p[2] > p[0] && p[2]+p[0] > p[1]) {
		return Nothing
	}

	c = (p[0] * p[0]) + (p[1] * p[1]) - (p[2] * p[2])
	if c == 0 {
		return RightTriangle
	}
	if c > 0 {
		return SharpTriangle
	}
	return ObtuseTriangle
}

func main() {
	var res = new(result)
	var a, b, c int
	var hasNext = true
	for hasNext {
		fmt.Scanf("%d %d %d", &a, &b, &c)
		switch checkTriangleType(a, b, c) {
		case Nothing:
			hasNext = false
		case RightTriangle:
			res.rTriangle++
		case SharpTriangle:
			res.sTriangle++
		case ObtuseTriangle:
			res.oTriangle++
		}
	}
	fmt.Println(res.String())
}

C++: #include<iostream>
#include<string>
#include<algorithm>
 
using namespace std;
 
int main()
{
	int tris = 0;
	int right_tris = 0;
	int acute_tris = 0;
	int obtuse_tris = 0;
	for( int i = 0; i < 100; i ++)
	{
		int a, b, c;
		if( !(cin >> a) )
		{
			cout << tris << " " << right_tris << " " << acute_tris << " " << obtuse_tris << endl;
			return 0;
		}

		cin >> b >> c;


		if( (a + b > c) && (b + c > a) && (c + a > b) )
		{
			tris ++;

			bool is_acute = false;
			int d = b * b + c * c;
			int aa = a * a;

			if( d == aa )
			{
				right_tris ++;
				continue;
			}
			else if ( d > aa )
			{
				is_acute = true;
			}
			else
			{
				obtuse_tris ++;
				continue;
			}
			d = c * c + a * a;
			aa = b * b;

			if( d == aa )
			{
				right_tris ++;
				continue;
			}
			else if ( d > aa )
			{
				is_acute = true;
			}
			else
			{
				obtuse_tris ++;
				continue;
			}
			d = a * a + b * b;
			aa = c * c;

			if( d == aa )
			{
				right_tris ++;
				continue;
			}
			else if ( d > aa )
			{
				is_acute = true;
			}
			else
			{
				obtuse_tris ++;
				continue;
			}
			if( is_acute )
			{
				acute_tris++;
			}
		}
	}

	return 0;
}

C++: #include<stdio.h>
#include<algorithm>
int p[3];
using namespace std;
int main(){
	int a=0,b=0,c=0,d=0;
	while(~scanf("%d%d%d",p,p+1,p+2)){
		std::sort(p,p+3);
		if(p[0]+p[1]<=p[2]){
			printf("%d %d %d %d\n",a,b,c,d);
			return 0;
		}
		a++;
		if(p[0]*p[0]+p[1]*p[1]==p[2]*p[2])b++;
		if(p[0]*p[0]+p[1]*p[1]>p[2]*p[2])c++;
		if(p[0]*p[0]+p[1]*p[1]<p[2]*p[2])d++;
	}
}

C++: #include <stdio.h>
#include <algorithm>
using namespace std;

int main(){
    int inp[3], tyoku = 0, don = 0, ei = 0;
    for (int i = 0; i < 5; i++){
        scanf("%d %d %d",&inp[0], &inp[1], &inp[2]);
        sort(inp, inp + 3);
        
        if(inp[0] + inp[1] > inp[2]){
            int p = inp[0]*inp[0] + inp[1]*inp[1];
            int q = inp[2]*inp[2];
            if(p == q) tyoku++;
            else if(p < q) ei++;
            else don++;
        }
    }
    
    printf("%d %d %d %d¥n", tyoku +don +ei, tyoku,ei,don);
    return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <string>
#include <vector>
#include <algorithm>
#include <functional>
#include <iomanip>
#include <stdlib.h>
#include <string.h>
#include <cmath>
#include <map>
#include <queue>
#include <deque>
#include <stack>
#include <set>
const long long MOD = 1000000007;
using namespace std;
typedef long long ll;
map<ll, int> mp;
signed main() {
	ios_base::sync_with_stdio(0);
	cin.tie(0);
	int t = 0;
	int e = 0;
	int d = 0;
	for (int i = 0; ; i++) {
		int a, b, c;
		cin >> a >> b >> c;
		int tmp = 0;
		if (a > b) {
			tmp = a;
			a = b; b = tmp;
		}
		if (b > c) {
			tmp = b;
			b = c; c = tmp;
		}
		if (a > b) {
			tmp = a;
			a = b; b = tmp;
		}
		if (a + b <= c) {
			cout << i << " " << t << " " << e << " " << d << endl;
			break;
		}
		if (a * a + b * b > c * c) e++;
		if (a * a + b * b == c * c) t++;
		if (a * a + b * b < c * c) d++;
	}
	return 0;
}

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

int main(){
  vector<int> a(3);
  int cnt[4] = {0, 0, 0, 0};
  while (cin >> a[0] >> a[1] >> a[2]) {
    if (a[0] + a[1] > a[2] && a[0] + a[2] > a[1] && a[1] + a[2] > a[0]) {
      cnt[0] ++;
      sort(a.begin(), a.end());
      if (a[0] * a[0] + a[1] * a[1]  > a[2] * a[2]) cnt[1] ++;
      if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) cnt[2] ++;
      if (a[0] * a[0] + a[1] * a[1]  < a[2] * a[2]) cnt[3] ++;
    }
  }

  cout << cnt[0];
  cout << " " << cnt[1];
  cout << " " << cnt[2];
  cout << " " << cnt[3];
  cout << endl;
}

C++: #include <bits/stdc++.h>
const double PI = acos(-1);
#define rep(i, n) for (int i = 0; i < (int)(n); i++ )
using namespace std;
int findSumOfDigits(int n) {
  int sum = 0;
  while (n > 0) { // n が 0 になるまで
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int main(){
  int a, b, c;
  int sum = 0;
  int Atriangle = 0, Rtriangle = 0, Otriangle = 0;
  while(true){
      cin >> a >> b >> c;
      if(a+b > c && b+c > a && c+a > b ){
        sum++;
        vector<int> abc = {a,b,c};
        sort(abc.begin(),abc.end());
        abc.at(0) = abc.at(0)*abc.at(0);
        abc.at(1) = abc.at(1)*abc.at(1);
        abc.at(2) = abc.at(2)*abc.at(2);
        if(abc.at(0)+abc.at(1) > abc.at(2)) Atriangle++;
        else if(abc.at(0)+abc.at(1) == abc.at(2)) Rtriangle++;
        else Otriangle++;
      }
      else{
        cout << sum << " " << Rtriangle << " " << Atriangle 
        << " " << Otriangle << endl;
        break;
      }
  }
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int a[3], p, q, r;
int main() {
	while (true) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] + a[1] <= a[2]) { cout << p + q + r << ' ' << p << ' ' << q << ' ' << r << ' ' << endl; break; }
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) { p++; }
		if (a[0] * a[0] + a[1] * a[1] > a[2] * a[2]) { q++; }
		if (a[0] * a[0] + a[1] * a[1] < a[2] * a[2]) { r++; }
	}
}