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 b > c {
			return b, a, c
		} else {
			return c, b, 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":
					o_t++
				}
				t++
			}	else {
				break
			}
			
	}
	fmt.Println(t, r_t, s_t, o_t)
}

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

using namespace std;

int main() {
	int a[3];
	int b, c, d;
	b = c = d = 0;
	while (cin >> a[0] >> a[1] >> a[2]) {
		for (int i = 2; i >= 0; i--) {
			for (int j = 0; j < i; j++) {
				if (a[j] > a[j+1]) {
					swap(a[j], a[j+1]);
				}
			}
		}
		if (a[0] + a[1] <= a[2]) {
			cout << b+c+d << ' ' << b << ' ' << c << ' ' << d << endl;
			while (cin >> a[0] >> a[1] >> a[2]) {
			}
			break;
		}
		if (a[0]*a[0] + a[1]*a[1] == a[2]*a[2]) {
			b++;
		} else if (a[0]*a[0] + a[1]*a[1] > a[2]*a[2]) {
			c++;
		}  else {
			d++;
		}
	}
	return 0;
}

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

int main(){
    
    int a,b,c;
    int s,ch,e,d;
    s = ch = e = d = 0;
    int tmp,hantei;
    while(1){
        cin >> a >> b >> c;
        if(a>b){
            if(a>c){
                tmp=a;
                a=c;
                c=tmp;
            }
        }else{
            if(b>c){
                tmp=b;
                b=c;
                c=tmp;
            }
        }
        if(c>=a+b) break;
        s++;
        hantei=c*c-a*a-b*b;
        if(hantei>0){
            d++;
        }else if(hantei<0){
            e++;
        }else{
            ch++;
        }
    }
    
    cout << s << " " << ch << " " << e << " " << d << endl;
    
    return 0;
}

C++: #include<iostream>
#include<sstream>
#include<cstdio>
#include<cstdlib>
#include<vector>
#include<string>
#include<stack>
#include<queue>
#include<deque>
#include<set>
#include<map>
#include<algorithm>
#include<functional>
#include<utility>
#include<cmath>
#include<ctime>
#include<complex>

using namespace std;

#define REP(i,s,e) for(int i=int(s);i<=int(e);i++)
#define rep(i,n) for(int i=0;i<int(n);i++)

int main(){

	int x,y,z,s,a=0,b=0,c=0;
	for(;;){
	cin >> x >> y >> z;

	if(abs(x-z)<y && y<x+z){
	vector<int>t(3);
	t[0]=x; t[1]=y; t[2]=z;
	sort(t.begin(),t.end());

	if(t[0]*t[0]+t[1]*t[1]>t[2]*t[2])  b++;
	if(t[0]*t[0]+t[1]*t[1]==t[2]*t[2]) a++;
	if(t[0]*t[0]+t[1]*t[1]<t[2]*t[2])  c++;

	}
	else{

		s=a+b+c;
		cout << s << " " << a << " " << b << " " << c << endl;
		break;
	}
	}

	return 0;
}

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

void sort( int* a )
{
    for( int i = 0; i < 2; i++ )
        for( int j = i + 1; j < 3; j++ )
            if( a[i] > a[j] )
            {
                int temp = a[i];
                a[i] = a[j];
                a[j] = temp;
            }
}

int main()
{
    int t[3];
    int t1 = 0, t2 = 0, t3 = 0, t4 = 0;

    while( cin >> t[0] >> t[1] >> t[2] )
    {
        sort( t );

        if( t[0] + t[1] > t[2] )                                            //三角形の存在条件
        {
            t1++;
            if( t[0] * t[0] + t[1] * t[1] == t[2] * t[2] )                  //直角三角形
                t2++;
            else if( t[0] * t[0] + t[1] * t[1] > t[2] * t[2] )              //鋭角三角形
                t3++;
            else                                                            //鈍角三角形
                t4++;
        }
        else
        {
            cout << t1 << " " << t2 << " " << t3 << " " << t4 << endl;
            break;
        }
    }
    return 0;
}

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

int main()
{
  int len[3];
  int type[3] = {0};

  while (~scanf("%d%d%d", &len[0], &len[1], &len[2])){
    sort(len, len + 3);

    if (len[0] + len[1] <= len[2]) break;
    else if (len[0] * len[0] + len[1] * len[1] == len[2] * len[2]){
      type[0]++;
    }
    else if (len[0] * len[0] + len[1] * len[1] > len[2] * len[2]){
      type[1]++;
    }
    else if (len[0] * len[0] + len[1] * len[1] < len[2] * len[2]){
      type[2]++;
    }
  }

  printf("%d %d %d %d\n", type[0] + type[1] + type[2], type[0], type[1], type[2]);

  return (0);
}

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

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) don++;
            else ei++;
        }
    }
    
    printf("%d %d %d %d¥n", tyoku +don +ei, tyoku,ei,don);
    return 0;
}

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

using namespace std;

int main(){
    int p[3];
    int donkaku=0,eikaku=0,tyokkaku=0;
    while(cin>>p[0]>>p[1]>>p[2]){
        sort(p,p+3);
        if(p[0]+p[1]<=p[2]){
            cout<<donkaku+eikaku+tyokkaku<<" "<<tyokkaku<<" "<<eikaku<<" "<<donkaku<<endl;break;
        }
        if(p[2]*p[2]<p[1]*p[1]+p[0]*p[0])eikaku++;
        else if(p[2]*p[2]>p[1]*p[1]+p[0]*p[0])donkaku++;
        else tyokkaku++;
        
    }
    return 0;
    
}

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

int main(){
  int a;
  int b;
  int c;
  int shahen;
  int hoge;
  int san_ei=0;
  int san_do=0;
  int san_ty=0;
  int san=0;
  
  for(;;){
    cin >> a >> b >> c;
    
    if(a<b){hoge=a; a=b; b=hoge;}
    if(a<c){hoge=a; a=c; c=hoge;}

    if(a+b>c && b+c>a && c+a>b){
      shahen=a*a;
      if(shahen==b*b+c*c){
	san_ty++;
      }else if(shahen>b*b+c*c){
	san_do++;
      }else if(shahen<b*b+c*c){
	san_ei++;
      }
      san++;
    }else{
      cout << san << " " << san_ty << " " << san_ei << " "  << san_do << "" << endl;
    break;
    }


  }
    
  return 0;
}

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

int main(){
	int a,b,c;
	int ca,cb,cc,cd;
	int l[3];
	while(cin>>l[0]>>l[1]>>l[2]){
		sort(l,l+3);
		a=l[0];
		b=l[1];
		c=l[2];
		if(c<a+b)
		ca++;
		
		if((a*a)+(b*b)==c*c)
		cb++;
		else if((a*a)+(b*b)>(c*c))
		cc++;
		else if((a*a)+(b*b)<(c*c))
		cd++;
		}
		cout<<ca<<" "<<cb<<" "<<cc<<" "<<cd<<endl;
		return 0;
	}

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

using namespace std;

int main() {
	
	int Length[3];
	
	while( cin >> Length[0] >> Length[1] >> Length[2]) {
		
	int Trinagle[4] = {};	
	sort(Length, Length+3);
	
	if( pow(Length[0], 2) + pow(Length[1], 2) == pow(Length[2], 3) )
	Trinagle[1]++;
	
	else if( pow(Length[0], 2) + pow(Length[1], 2) < pow(Length[2], 3) )
	Trinagle[2]++;
	
	else
	Trinagle[3]++;
	
	Trinagle[0] += ( Trinagle[1] + Trinagle[2] + Trinagle[3] ) ;
	cout << Trinagle[0] << " " << Trinagle[1] << " "
		 << Trinagle[2] << " " << Trinagle[3] << "\n";
}
	return 0;
}