Go: package main
// 三角形の形は辺の長さで決まる． 順番に３つの正整数が与えられたとき， 辺の長さがそれらの値と一致する三角形が存在するかどうかを調べ,
//  存在するなら鋭角三角形，直角三角形，鈍角三角形のいずれかを判定し， 次の入力へ進む． 三角形が存在しないとき， それまでに入力された，
// 三角形，直角三角形，鋭角三角形，鈍角三角形の 個数を空白で区切って出力し， それ以降の入力は無視して終了する
// 入力の中には必ず三角形が存在しないようなものがある と仮定してよい. 入力の行数は判らないが各行には３つの正整数が空白で区切って書かれている．
//  ただし，各整数は100 以下とする.

// return
// 三角形 直角三角形　鈍角三角形 鈍角三角形
import (
	"os"
	"fmt"
	"bufio"
)


var sc = bufio.NewScanner(os.Stdin)

func max(a, b, c int) (int, int, int) {
	if a > b {
		if b > c {
			return a, b, c
		} else {
			return a, c, b
		}
	} else {
		if a > c {
			return b, a, c
		} else {
			return b, c, a
		}
	}
}

func find_trianges(a, b, c int) string {
	a, b, c = max(a, b, c)
	r := b*b + c*c
	if a*a > r {
		return "obtuse_triangle"
	} else if a*a < r {
		return "sharped_triangle"
	} else {
		return "right_triangle"
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)
	var t, r_t, s_t, o_t int = 0, 0, 0, 0
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)
			a, b, c = max(a, b, c)
			if (a < b + c) {
				r := find_trianges(a, b, c)
				switch r {
				case "right_triangle":
					r_t++
				case "sharped_triangle":
					s_t++
				case "obtuse_triangle":
					r_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

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

using namespace std;

namespace prob0582 {
	enum TriangleType { DoesNotExist = 0, RightAngle, Accute, Obtuse };

	TriangleType checkTriangleType(array<int, 3> edges)
	{
		int longest = 0;
		int longest2sq = 0;
		int sum = 0;
		int sumsq = 0;

		for (int i = 0; i < 3; ++i) {
			if (edges[i] > longest) longest = edges[i];
			sum += edges[i];
			sumsq += edges[i] * edges[i];
		}
		longest2sq = 2 * longest * longest;

		if (sum <= 2 * longest) return DoesNotExist;
		if (sumsq > longest2sq) return Accute;
		if (sumsq == longest2sq) return RightAngle;
		return Obtuse;
	}

	void solve(istream &sin, ostream &sout)
	{
		int total = 0;
		int eachType[]{ 0,0,0,0 };

		array<int, 3> edges;
		TriangleType type;

		do
		{
			sin >> edges[0] >> edges[1] >> edges[2];
			++total;
			type = checkTriangleType(edges);
			eachType[static_cast<int>(type)]++;
		} while (type != DoesNotExist);
		--total;

		sout << total;
		for (int i = 0; i < 3; ++i) sout << " " << eachType[i + 1];
		sout << endl;
	}
}

int main()
{
	prob0582::solve(cin, cout);
}

C++: #include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

#define EPS 1e-8

int main(){
    int a=0,b=0,c=0,d=0;
    int x,y,z;
    while(cin>>x>>y>>z){
        vi in;
        in.pb(x);
        in.pb(y);
        in.pb(z);
        sort(all(in));
        
        if(in[0]+in[1]<=in[2]){
            cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl;
            while(cin>>x>>y>>z);
            break;
        }
        else a++;
        
        double l,m,n;
        l = acos( (-1*in[0]*in[0] + in[1]*in[1] + in[2]*in[2])/(2.0*in[1]*in[2]) );
        m = acos( (-1*in[1]*in[1] + in[2]*in[2] + in[0]*in[0])/(2.0*in[2]*in[0]) );
        n = acos( (-1*in[2]*in[2] + in[0]*in[0] + in[1]*in[1])/(2.0*in[0]*in[1]) );
        
        l=l*180/3.141592;
        m=m*180/3.141592;
        n=n*180/3.141592;

        
        if( (l-90)*(l-90)<EPS || (m-90)*(m-90)<EPS || (n-90)*(n-90)<EPS ){
            b++;
        }
        else if( l>90-EPS || m>90-EPS || n>90-EPS ){
            d++;
        }
        else c++;
    }
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vll;
int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    int ttl=0,cho=0,eik=0,don=0;
    while(true){
        vi a(3);for(int i=0;i<3;i++)cin>>a[i];
        sort(a.begin(),a.end());
        if(a[0]+a[1]<=a[2]){
            printf("%d %d %d %d\n",ttl,cho,eik,don);
            return 0;
        }
        ttl++;
        if(a[0]*a[0]+a[1]*a[1]==a[2]*a[2])cho++;
        else if(a[0]*a[0]+a[1]*a[1]>a[2]*a[2])eik++;
        else don++;
    }
    return 0;
}

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

int main()
{	
	int a[3];
	int t[4] = { 0, 0, 0, 0 };

	cin >> a[0] >> a[1] >> a[2];
	sort(a, a + 3);

	while (a[0] + a[1] > a[2]) {
		t[0]++;

		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
			t[1]++;
		else if (a[0] * a[0] + a[1] * a[1] > a[2] * a[2])
			t[2]++;
		else
			t[3]++;

		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
	}

	cout << t[0] << " " << t[1] << " " << t[2] << " " << t[3] << endl;

	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a[3];
	bool b = true;
	int w, x, y, z;
	while (cin){
		if (b) {
			w++;
			sort(a, a + 3);
			if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2])
				x++;
			else if (a[0] * a[0] + a[1] * a[1] < a[2] * a[2])
				y++;
			else z++;
		}
	}
	cout << w << ' ' << x << ' ' << y << ' ' << z << endl;
}

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

int main(){
  int hen[3];
  int cnt=0;
  int d=0;
  int e=0;
  
  while(1)
    {
      for(int i=0;i < 3;i++)
	{
	  cin >> hen[i];
	}
      sort(hen,hen+3);

      int judge = pow(hen[0],2) + pow(hen[1],2);
      int most = pow(hen[2],2);
      
      if(hen[0]+hen[1] > hen[2] && hen[1]+hen[2] > hen[0] && hen[2]+hen[0] > hen[1])
	{
	  if(judge < most)
	    {
	      d++;
	    }
	  else if(judge > most)
	    {
	      e++;
	    }
	  else if(judge == most)
	    {
	      cnt++;
	    }
	}
      else
	{
	  break;
	}
    }
  cout << cnt+d+e << " " << cnt << " " << d << " " << e << endl;
  return 0;
}

C++: #include <iostream>
#include <algorithm>
using namespace std;
int main(){
	int a=0,b=0,c=0,d=0;
	int e[3];
	while(cin >> e[0] >> e[1] >> e[2]){
		sort(e,e+3);
		if(e[0]+e[1]>e[2]){
			++a;
			for(int i=0; i<3; ++i)	e[i]*=e[i];
			if(e[0]+e[1]==e[2])	++b;
			else if(e[0]+e[1]>e[2])	++c;
			else	++d;
		}else	break;
	}
	cout << a << " " << b << " " << c << " " << d << endl;
}

C++: #include <iostream>
#include <algorithm>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cstring>
#include <climits>

#define LP(i,n) for(int i=0;i<n;i++)
#define Mset(x,v) memset(x,v,sizeof(x))
#define INF INT_MAX

using namespace std;
using LL=long long;

int main(){
    int H[3],s=0,t=0,e=0,d=0;
    while(1){
        cin>>H[0]>>H[1]>>H[2];
        sort(H,H+3);
        if(H[2]>=H[0]+H[1]) break;
        s++;
        if(H[0]*H[0]+H[1]*H[1]-H[2]*H[2]==0) t++;
        else if(H[0]*H[0]+H[1]*H[1]-H[2]*H[2]>0) e++;
        else if(H[0]*H[0]+H[1]*H[1]-H[2]*H[2]<0) d++;
    }
    cout<<s<<" "<<t<<" "<<e<<" "<<d<<endl;
    return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define rep(i,n) for(ll i=0;i<(ll)(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

#define EPS 1e-8

int main(){
    int a,b,c,d;
    int x,y,z;
    while(cin>>x>>y>>z){
        vi in;
        in.pb(x);
        in.pb(y);
        in.pb(z);
        sort(all(in));
        
        if(in[0]+in[1]<=in[2]){
            cout<<a<<" "<<b<<" "<<c<<" "<<d<<endl;
            break;
        }
        else a++;
        
        double l,m,n;
        l = acos( (-1*in[0]*in[0] + in[1]*in[1] + in[2]*in[2])/(2.0*in[1]*in[2]) );
        m = acos( (-1*in[1]*in[1] + in[2]*in[2] + in[0]*in[0])/(2.0*in[2]*in[0]) );
        n = acos( (-1*in[2]*in[2] + in[0]*in[0] + in[1]*in[1])/(2.0*in[0]*in[1]) );
        
        l=l*180/3.141592;
        m=m*180/3.141592;
        n=n*180/3.141592;

        
        if( (l-90)*(l-90)<EPS || (m-90)*(m-90)<EPS || (n-90)*(n-90)<EPS ){
            b++;
        }
        else if( l>90-EPS || m>90-EPS || n>90-EPS ){
            d++;
        }
        else c++;
    }
}