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 c, a, 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],w=0,x=0,y=0,z=0;
	while(cin>>a[0]>>a[1]>>a[2]){
		sort(a,a+3);
        if(a[0]+a[1]<=a[2])break;
		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++;
		w++;
	}
	cout<<w<<" "<<x<<" "<<y<<" "<<z<<endl;
    return 0;
    }

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

int main() {
    int x,y,z;
    int san,don,cho,ei;
    for(int i=0;;i++){
        cin >> x >> y >> z;
        int a = max(max(x,y),z),b,c;
        if(a == x) b=y,c=z;
        else if(a == y) b=z,c=x;
        else if(a == z) b=x,c=y;

        if(a >= b+c){ cout << san << ' ' << cho << ' ' << ei << ' ' << don << endl;
                    return 0;}

        else if(a*a > b*b + c*c){
            san++;
            don++;
        }
        else if(a*a == b*b + c*c){
            san++;
            cho++;
        }
        else if(a*a < b*b + c*c){
            san++;
            ei++;
        }
    }
}

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

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

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

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <math.h>
using namespace std;
int a, b, c;
int cnt_a, cnt_b, cnt_c;
bool flag = true;
int main() {
	int i = 0;
	while (cin >> a >> b >> c, flag) {
		int maxV, minV, cen;
		maxV = max(a, max(b, c));
		minV = min(a, min(b, c));
		cen = a + b + c - minV - maxV;
		
		if (a + b > c&&a + c > b&&b + c > a) {
			if (minV*minV + cen * cen - maxV * maxV == 0) {
				cnt_b++; i++;
				continue;
			}
			 else if (minV*minV + cen * cen - maxV * maxV > 0) {
				cnt_a++; i++;
				continue;
			}
			
			else if (minV*minV + cen * cen - maxV * maxV < 0) {
				cnt_c++; i++;
				continue;
			}
		}else {
			flag = false;
		}
		if (!flag) break;
	}
	cout << i << " " << cnt_b << " " << cnt_a << " " << cnt_c << endl;
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a[3];
	bool b = true;
	unsigned w, x, y, z;
	w = 0; x = 0; y = 0; z = 0;
	while (cin >> a[0] >> a[1] >> a[2]) {
		if (b) {
			w++;
			sort(a, a + 3);
			if (a[0] + a[1] < a[2]){
				b = false;
			}
			else 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 <cstdio>
#include <algorithm>

using namespace std;

int main()
{
	int a, b, c;
	int na, nb, nc, nd;
	
	na = nb = nc = nd = 0;
	while (1){
		scanf("%d %d %d", &a, &b, &c);
		if (a < b) swap(a, b); if (a < c) swap(a, c);
		if (a >= b + c) break;
		
		na++;
		if (b * b + c * c == a * a) nc++;
		else if (b * b + c * c < a * a) nd++;
		else nb++;
	}
	printf("%d %d %d %d\n", na, nc, nb, nd);
	
	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[1] < a[2]){
				b = false;
			}
			else 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<iostream>
#include<algorithm>
using namespace std;
int main() {
	int a[3];
	bool b = true;
	int w, x, y, z;
	while (cin >> a[0] >> a[1] >> a[2]) {
		if (b) {
			w++;
			sort(a, a + 3);
			if (a[0] + a[1] < a[2]){
				b = false;
			}
			else 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>
#define rep(i,n) for(int i=0;i<n;i++)
//#define int long long
using namespace std;

int a[3];
int eikaku, tyokkaku, donkaku;

signed main()
{
	while (true) {
		rep(i,3) cin >> a[i];
		sort(a, a + 3);

		if (a[2] >= a[0] + a[1]) {
			cout << eikaku + tyokkaku + donkaku << " " << tyokkaku << " " << eikaku << " " << donkaku << endl;
			break;
		}

		if (a[0]*a[0] + a[1]*a[1] - a[2]*a[2] == 0) {
			tyokkaku++;
		} else if (a[0]*a[0] + a[1]*a[1] - a[2]*a[2] < 0) {
			donkaku++;
		} else {
			eikaku++;
		}
	}
}