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 "bits/stdc++.h"

using namespace std;

#define rep(i,a,b) for(int i=(a), i##_len=(b);i<i##_len;i++)
#define rrep(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define all(c) begin(c),end(c)

//#define int long long
#define SZ(x) ((int)(x).size())
#define pb push_back
#define mp make_pair

typedef long long ll;
//typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
typedef pair<ll, int> pli;
typedef pair<double, double> pdd;
typedef vector<vector<int>> mat;
typedef unsigned int uint;

template<class T> bool chmax(T &a, const T &b) { if (a < b) { a = b; return true; } return false; }
template<class T> bool chmin(T &a, const T &b) { if (b < a) { a = b; return true; } return false; }

const int INF = sizeof(int) == sizeof(long long) ? 0x3f3f3f3f3f3f3f3fLL : 0x3f3f3f3f;
const int MOD = (int)1e9 + 7;
const double EPS = 1e-9;

ll a[3];

signed main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);

	while (true)
	{
		ll t[3];
		rep(i, 0, 3)
		{
			cin >> t[i];
		}
		sort(t, t + 3);
		if (t[0] + t[1] <= t[2])
		{
			printf("%lld %lld %lld %lld", accumulate(a, a + 3, 0LL), a[0], a[1], a[2]);
			break;
		}
		else
		{
			ll tv = t[0] * t[0] + t[1] * t[1] - t[2] * t[2];
			if (tv==0LL)
			{
				a[0]++;
			}
			else if (tv > 0LL)
			{
				a[1]++;
			}
			else
			{
				a[2]++;
			}
		}
	}

	return 0;
}

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

int main(){
	int x,y,z;
	int ans[4] = {0};

	while(1){
		cin >> x >> y >> z;
		if(x > y){
			int num = y;
			y = x;
			x = num;
		}
		if(y > z){
			int num = z;
			z = y;
			y = num;
		}
		if(x > y){
			int num = y;
			y = x;
			x = num;
		}
		if(x + y <= z)
			break;
		else if(x * x + y * y - z * z < 0)
			ans[3]++;
		else if(x * x + y * y - z * z > 0)
			ans[2]++;
		else if(x * x + y * y - z * z == 0)
			ans[1]++;

		ans[0] = ans[1] + ans[2] + ans[3];
	}
	for(int i = 0; i < 4; i++){
		cout << ans[i];
		if(i != 3) cout << " ";
	}
		cout << endl;
}

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

int main(){
  int cyo=0;
  int don=0;
  int ei=0;
  int count=0;

  for(int i=0;i<100;i++){
    int t[3];
    cin>>t[0]>>t[1]>>t[2];
    sort(t,t+3);

    if(t[0]+t[1]<=t[2])break;
    else {
      count++;
      t[0]=t[0]*t[0];
      t[1]=t[1]*t[1];
      t[2]=t[2]*t[2];
      if(t[0]+t[1]==t[2])cyo++;
      if(t[0]+t[1]<t[2])ei++;
      if(t[0]+t[1]>t[2])don++;
    }
  }
  cout<<count<<" "<<cyo<<" "<<don<<" "<<ei<<endl;

}

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

int main(){
	int a=0,b=0,c=0;
	int e[3];
	while(scanf("%d%d%d", &e[0], &e[1], &e[2]) != EOF){
		sort(e, e+3);
		if(e[2] >= e[1]+e[0]) break;
		if(e[2]*e[2] == e[0]*e[0] +e[1]*e[1]) a++;
		if(e[2]*e[2] < e[0]*e[0] +e[1]*e[1]) b++;
		if(e[2]*e[2] > e[0]*e[0] +e[1]*e[1]) c++;
		cout << a << b << c << endl;
	}
	printf("%d %d %d %d\n", a+b+c, a, b, c);
	return 0;
}

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

int main(){
	int length[3];
	int w = 0, x = 0, y = 0, z = 0;

	while(cin >> length[0] >> length[1] >> length[2]){
		sort(length, length+3);

		if(length[2] < length[0] + length[1]){
			w++;
			if(pow(length[2], 2) == pow(length[0], 2) + pow(length[1], 2)) y++;
			else if(pow(length[2], 2) < pow(length[0], 2) + pow(length[1], 2)) z++;
			else x++;
		}
	}
	cout << w << ' ' << y << ' ' << z << ' ' << x << endl;

}

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

int main(){
	int tri[4] = {0,0,0,0},a[3];
	while(1){
		scanf("%d %d %d",&a[0],&a[1],&a[2]);
		sort(a,a + 3);
		if(a[0] + a[1] > a[2]){
			tri[0]++;
			if(a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) tri[1]++;
			else if(a[0] * a[0] + a[1] * a[1] > a[2] * a[2]) tri[2]++;
			else if(a[0] * a[0] + a[1] * a[1] < a[2] * a[2]) tri[3]++;
		}else {
			printf("%d %d %d %d\n",tri[0],tri[1],tri[2],tri[3]);
			return 0;
		}
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
    int a,b,c,l=0,m=0,n=0,o=0;
    while(1){
         cin>>a>>b>>c;
         if(a+b>c&&b+c>a&&a+c>b){
           l+=1;
           if(a*a+b*b==c*c||a*a+c*c==b*b||b*b+c*c==a*a){
             m+=1;
           }
           else {
           int j=0;
           if(j<a){
           j+=a;
           }
           if(j<b){
           j+=b;
           }
           if(j<c){
           j+=c;
           }
           if(j==a){
             if(a*a<b*b+c*c){
               n+=1;
             }
             else  if(a*a>b*b+c*c){
               o+=1;
             }
           }
           else if(j==b){
             if(b*b<a*a+c*c){
               n+=1;
             }
           else  if(b*b>a*a+c*c){
               o+=1;
             }
           }
           else{
                  if(c*c<b*b+a*a){
                    n+=1;
                  }
                  else if(c*c>b*b+a*a){
                    o+=1;
                  }
           }
         }
         }
         else{break;}
     }
     cout<<l<<" "<<m<<" "<<n<<" "<<o<<endl;
     return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int i,x,y ,z,a,b,c,ch=0,ei=0,d=0;

	for(i=0;i<100;i++)
	{
		cin>>x>>y>>z;

		if(x>=y && y>=z) 
		{
			a=x;
			b=y;
			c=z;
		}
		else if(y>=x  && x>=z)
		{
			a=y;
			b=x;
			c=z;
		}
		else //(z>=x && x>=y)
		{
			a=z;
			b=y;
			c=x;
		}

		if(b+c<=a)
		{
			break;
		}  

		a = a*a;
		b = b*b;
		c = c*c;

		if (a-(b+c)<0)
		{
			ei+=1;
		}

		if (a-(b+c)>0)
		{
			d+=1;
		}

		if(a == b+c)
		{
			ch+=1;
		}

		
	}

	cout<<ch+d+ei<<" "<<ch<<" "<<ei<<" "<<d<<endl;



	return 0;
}

C++: // 0582.cpp : ??????????????? ??¢????????±????????§????????¨????????? ?????????????????????????????????
//

#include <bits/stdc++.h>

using namespace std;

int main()
{
	int len[3], result[4] = { 0 };
	while (1) {
		for (int i = 0; i < 3; ++i) {
			cin >> len[i];
		}

		sort(len, len + 3);

		if (len[0] + len[1] > len[2]) {
			result[0]++;
		}
		else {
			goto EXIT;
		}

		int left = len[0] * len[0] + len[1] * len[1], right = len[2] * len[2];
		if (left == right) {
			result[1]++;
		}
		else {
			if (left > right) {
				result[2]++;
			}
			else {
				result[3]++;
			}
		}
	}

EXIT:

	for (int i = 0; i < 3; ++i) {
		cout << result[i] << " ";
	}
	cout << result[3] << endl;

    return 0;
}