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;

const double EPS = 1e-8;

int main(){
  int v[3],ans[3],ansn=0;
  bool f = false;
  fill(ans,ans+3,0);
  while(cin >> v[0] >> v[1] >> v[2]){
    if(f) continue;
    sort(v,v+3);
    if(v[2] >= v[1] + v[0]){
      cout << ansn;
      for(int i=0;i<3;i++) cout << ' ' << ans[i];
      cout << endl;
      f = true;
    } else {
      double w[3];
      for(int i=0;i<3;i++) w[i] = (double)v[i];
      double a = (w[0]*w[0] + w[1]*w[1] - w[2]*w[2]) / (2 * w[0] * w[1]);

      ansn++;
      if(a > EPS) ans[1]++;
      else if(a < -EPS) ans[2]++;
      else ans[0]++;
    }
  }
}

C++: #include<iostream>
using namespace std;
int main(){

	int i,k,j,a=0,b=0,c=0,d=0;
while(1){
	cin>>i>>k>>j;
	if(i>j){swap(i,j);}
	if(k>j){swap(k,j);}

	if(i+k>j&&k+j>i&&i+j>k){a=a+1;}
	else{break;}

	if(i*i+k*k>j*j){b=b+1;}
	if(i*i+k*k<j*j){c=c+1;}
	if(i*i+k*k==j*j){d=d+1;}

}
    cout<<a<<" "<<d<<" "<<b<<" "<<c<<endl;

	return 0;
}

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

int a[3], c[3];

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

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


bool sankaku(int a, int b, int c) {
    int max_ = a;
    if (max_ < b) {
        max_ = b;
    }
    if (max_ < c) {
        max_ = c;
    }
    if (a + b + c - max_ > max_) {
        return true;
    }
    else {
        return false;
    }
}


int nani_sankaku(int a, int b, int c) {
    int hen[3] = {a, b, c};
    sort(hen, hen + 3);
    double ab = sqrt(pow(a, 2) + pow(b, 2));
    double c_ = pow(c, 2);
    if (ab > c) {
        return 0;
    }
    if (ab == c) {
        return 1;
    }
    if (ab < c) {
        return 2;
    }

}


int main() {
    int ANS[3] = {0, 0, 0};
    while (true) {
        int a;
        int b;
        int c;
        cin >> a >> b >> c;

        if (sankaku(a, b, c)) {
            ANS[nani_sankaku(a, b, c)]++;
        }
        else {
            cout << ANS[0] << ' ' << ANS[1] << ' ' << ANS[2] << '\n';
            return 0;
        }
    }
}

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

int main() {
	int a, b, c;
	int tri = 0;
	int acte = 0;
	int right = 0;
	int obtuse = 0;
	vector<int> t(3);
	while (cin >> a >> b >> c) {
		t[0] = a;
		t[1] = b;
		t[2] = c;
		sort(t.begin(), t.end());
		a = pow(t[0], 2);
		b = pow(t[1], 2);
		c = pow(t[2], 2);
		if (t[0] + t[1] > t[2]) {
			tri++;
			if (a + b == c) {
				right++;
			}
			else if (a + b > c){
				acte++;
			}
			else if (a + b < c) {
				obtuse++;
			}
		}
	}
	cout << tri << " " << right << " " << acte << " " << obtuse << endl;
	return 0;
}

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

using namespace std;

/*
三角形：最大の辺 < その他の辺の和
鋭角三角形：最大の辺の二乗 < 最小の辺の二乗＋中間の辺の二乗
直角三角形：最大の辺の二乗 = 最小の辺の二乗＋中間の辺の二乗
鈍角三角形：最大の辺の二乗 > 最小の辺の二乗＋中間の辺の二乗
*/

int main() {
	int a[3];
	int Triangle = 0;
	int eikaku = 0;
	int chokkaku = 0;
	int donkaku = 0;

	while (true) {
		cin >> a[0] >> a[1] >> a[2];
		sort(begin(a), end(a));
		// 三角判定
		if (a[2] < a[1] + a[0]) {
			Triangle++;
			const int a0_sq = a[0] * a[0];
			const int a1_sq = a[1] * a[1];
			const int a2_sq = a[2] * a[2];
			//鋭角判定
			if (a2_sq < a1_sq + a0_sq) {
				eikaku++;
			}
			//直角判定
			else if(a2_sq == a1_sq + a0_sq) {
				chokkaku++;
			}
			else {
				donkaku++;
			}
		}
		else {
			break;
		}
	}

	cout << Triangle << ' ' << chokkaku << ' ' << eikaku << ' ' << donkaku << endl;

	return 0;
}

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

const double EPS = 1e-8;

int main(){
  int v[3],ans[3],ansn=0;
  bool f = false;
  fill(ans,ans+3,0);
  while(cin >> v[0] >> v[1] >> v[2]){
    if(f) continue;
    sort(v,v+3);
    if(v[2] >= v[1] + v[0]){
      cout << ansn;
      for(int i=0;i<3;i++) cout <<  ans[i];
      cout << endl;
      f = true;
    } else {
      double w[3];
      for(int i=0;i<3;i++) w[i] = (double)v[i];
      double a = (w[0]*w[0] + w[1]*w[1] - w[2]*w[2]) / (2 * w[0] * w[1]);

      ansn++;
      if(a > EPS) ans[1]++;
      else if(a < -EPS) ans[2]++;
      else ans[0]++;
    }
  }
}

Python: # coding: utf-8
def solve(sides):
    ans = [0, 0, 0, 0]

    for a, b, c in sides:
        # is_triangle
        if a + b > c and b + c > a and c + a > b:
            ans[0] += 1
            # right-angled
            if c ** 2 == a ** 2 + b ** 2:
                ans[1] += 1
            # Obtuse
            elif c ** 2 < a ** 2 + b ** 2:
                ans[2] += 1
            # acute
            elif c ** 2 > a ** 2 + b ** 2:
                ans[3] += 1
        else:
            break

    return ' '.join(map(str, ans))


if __name__ == '__main__':
    while True:
        sides = []
        try:
            while True:
                temp = list(map(int, input().split()))
                sides.append(sorted(temp))
        except EOFError:
            break
    
    print(solve(sides))

Python: result = [0] * 3
while 1:
    a, b, c = sorted(list(map(int, input().split())))
    if a + b > c:
        flag = c * c - b * b - a * a
        if flag == 0:
            result[0] += 1
        elif flag > 0:
            result[1] += 1
        else:
            result[2] += 1
print(sum(result), *result)

Python: def run():
    judge = [0, 0, 0, 0]
    while True:
        a, b, c = sorted((int(x) for x in input().split()))
        if a + b <= c or min([a, b, c]) <= 0:
            print(' '.join(map(str, judge)))
            break
        else:
            S = a ** 2 + b ** 2 - c ** 2
            judge[0] += 1
            if S == 0:
                judge[1] += 1
            elif S > 0:
                judge[2] += 1
            else:
                judge[3] += 1





if __name__ == '__main__':
    run()

Python: import sys

def triangle_check(a, b, c):
    e1, e2, e3 = sorted([a, b, c], reverse=True)
    if e1 <= 0 or e2 <= 0 or e3 <= 0: return 0
    if e1 < e2 + e3: return 0
    if e1**2 == e2**2 + e3**2: return 2
    elif e1**2 < e2**2 + e3**2: return 1
    elif e1**2 > e2**2 + e3**2: return 3

ans = [0 for i in range(4)]

lines = sys.stdin.readlines()
for line in lines:
    a, b, c = list(map(int, line.split(' ')))
    rst = triangle_check(a, b, c)
    if rst == 0:
        print(' '.join(list(map(str, ans))))
        break
    ans[0] += 1
    ans[rst] += 1