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 <iostream>
#include <vector>
#include <algorithm>

using namespace std;

void solve()
{
	vector<int> edge(3);
	int triangle = 0;
	int right_triangle = 0;
	int acute_triangle = 0;
	int obtuse_triangle = 0;
	while(cin >> edge[0] >> edge[1] >> edge[2])
	{
		if(edge[0] + edge[1] > edge[2] && edge[1] + edge[2] > edge[0] && edge[2] + edge[0] > edge[1])
		{
			++triangle;
		}
		else
		{
			break;
		}
		sort(edge.begin(), edge.end());
		double cos_theta = (double)(edge[0] * edge[0] + edge[1] * edge[1] - edge[2] * edge[2]) / (2 * edge[0] * edge[1]);
		if( edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2] ||
			edge[1] * edge[1] + edge[2] * edge[2] == edge[0] * edge[0] ||
			edge[2] * edge[2] + edge[0] * edge[0] == edge[1] * edge[1])
		{
			++right_triangle;
		}
		else if(cos_theta < 0)
		{
			++obtuse_triangle;
		}
		else
		{
			++acute_triangle;
		}
	}
	cout << triangle << " " << right_triangle << " " << acute_triangle << " " << obtuse_triangle << endl;
}

int main()
{
	solve();
	return(0);
}

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

using namespace std;

int main(int argc, char const *argv[]) {
    int edge[3];
    int tri[3]={0};//0:right, 1:acute, 2:obtuse
    int total=0;

    while(1){
        for(int i=0;i<3;i++)
            cin >> edge[i];
        sort(edge,edge+3);
        if(edge[2] < edge[0] + edge[1]){
            total++;
            if(pow(edge[2],2) == pow(edge[0],2) + pow(edge[1],2)){
                tri[0]++;
            }else if(pow(edge[2],2) < pow(edge[0],2) + pow(edge[1],2)){
                tri[1]++;
            }else{
                tri[2]++;
            }
        }else{
            break;
        }
    }
    printf("%d %d %d %d\n",total,tri[0],tri[1],tri[2]);
    return 0;
}

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

int main() {
    int INF = 100000;
    int a[INF], b[INF], c[INF];
    for (int i = 0; i < INF; ++i) {
        cin >> a[i] >> b[i] >> c[i];
        if (a[i] > b[i]) {
            int t = a[i];
            a[i] = b[i];
            b[i] = t;
        }
        if (b[i] > c[i]) {
            int t = b[i];
            b[i] = c[i];
            c[i] = t;
        }
        if (a[i] > b[i]) {
            int t = a[i];
            a[i] = b[i];
            b[i] = t;
        }
    }

    int tr = 0, ttr = 0, etr = 0, dtr = 0;
    for (int i = 0; i < INF; ++i) {
        if (c[i] >= a[i] + b[i]) {
            cout << tr << " " << ttr << " " << etr << " " << dtr << endl;
            break;
        }
        else if (c[i] * c[i] > a[i] * a[i] + b[i] * b[i]) {
            ++tr;
            ++dtr;
        }
        else if (c[i] * c[i] == a[i] * a[i] + b[i] * b[i]) {
            ++tr;
            ++ttr;
        }
        else if (c[i] * c[i] < a[i] * a[i] + b[i] * b[i]) {
            ++tr;
            ++etr;
        }
    }
    
    return 0;
}

C++: #include<iostream>
#include<cmath>
#include<algorithm>
using namespace std;
int a[3], p, q, r;
int main() {
	while (true) {
		cin >> a[0] >> a[1] >> a[2];
		sort(a, a + 3);
		if (a[0] + a[1] <= a[2]) { cout << p + q + r << ' ' << p << ' ' << q << ' ' << r << endl; break; }
		if (a[0] * a[0] + a[1] * a[1] == a[2] * a[2]) { p++; }
		if (a[0] * a[0] + a[1] * a[1] > a[2] * a[2]) { q++; }
		if (a[0] * a[0] + a[1] * a[1] < a[2] * a[2]) { r++; }
	}
}

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

bool check(vector<int>& vec)
{
  int a,b,c;
  a = vec[0],b = vec[1],c = vec[2];
  if(a >= b+c || b >= a+c || c >= a+b)
    return false;
  return true;
}

int main()
{
  int _1,_2,_3,_4;
  _1 = _2 = _3 = _4 = 0;
  while(true)
    {
      vector<int> vec;
      for(int i=0;i<3;i++)
	{
	  int a;
	  cin >> a;
	  vec.push_back(a);
	}
      sort(vec.begin(),vec.end());
      if(!check(vec))      
	break;
      int a,b,c;
      a = vec[0],b = vec[1],c = vec[2];

      _1++;
      if(c*c == a*a+b*b)
	_2++;
      if(c*c < a*a+b*b)
	_3++;
      if(c*c > a*a+b*b)
	_4++;

    }
  cout << _1 << " " << _2 << " " << _3 << " " << _4 << endl;
  return 0;
}

C++: #include<cstdio>
int main(void){
    
    int a=0,b=0,c=0;
    int change=0;
    int right=0,obtuse=0,acute=0;
    int value=0,check=0,count=0;
    int flag=true;
    while(flag){
        count++;
        scanf("%d%d%d",&a,&b,&c);
        if(c<a){
            change=a;
            a=c;
            c=change;
        }
        if(c<b){
            change=b;
            b=c;
            c=change;
        }
        check=a+b-c;
        value=a*a+b*b-c*c;
        if(check<=0){
            break;
        }
        if(value==0){
            right++;
        }
        else if(value<0){
            obtuse++;
        }
        else{
            acute++;
        }
    }
    printf("%d %d %d %d\n",count,right,acute,obtuse);
    return 0;
}

C++: #include <bits/stdc++.h>
//---------------------------
using namespace std;
//---------------------------
#define REP(i,n) for(int i = 0; i < (n); i++)
#define P(x) cout << (x) << "\n"

#define MOD 1000000007 // 1e9+7
#define PI 3.1415926525
#define ll long long int // 10^18
#define INF 1000000001 // 1e9+1

int dx[4]={1,-1,0,0};
int dy[4]={0,0,1,-1};
//---------------------------
int a[3],b[4];

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

  // ifstream in("input.txt");
  // cin.rdbuf(in.rdbuf());

  while(true){
    cin>>a[0]>>a[1]>>a[2];
    sort(a,a+3);
    if(a[2]>=a[0]+a[1])break;
    b[0]++;
    int rec=a[2]*a[2]-a[1]*a[1]-a[0]*a[0];
    if(rec==0)b[1]++;
    if(rec>0)b[3]++;
    if(rec<0)b[2]++;
  }
  REP(i,4){
    cout<<b[i]<<" \n"[i==3];
  }
  return 0;
}

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

using namespace std;

void solve()
{
	vector<int> edge(3);
	int triangle = 0;
	int right_triangle = 0;
	int acute_triangle = 0;
	int obtuse_triangle = 0;
	while(cin >> edge[0] >> edge[1] >> edge[2])
	{
		if(edge[0] + edge[1] > edge[2] && edge[1] + edge[2] > edge[0] && edge[2] + edge[0] > edge[1])
		{
			++triangle;
		}
		else
		{
			break;
		}
		sort(edge.begin(), edge.end());
		double cos_theta = (edge[0] * edge[0] + edge[1] * edge[1] - edge[2] * edge[2]) / (2 * edge[0] + edge[1]);
		if( edge[0] * edge[0] + edge[1] * edge[1] == edge[2] * edge[2] ||
			edge[1] * edge[1] + edge[2] * edge[2] == edge[0] * edge[0] ||
			edge[2] * edge[2] + edge[0] * edge[0] == edge[1] * edge[1])
		{
			++right_triangle;
		}
		else if(cos_theta < 0)
		{
			++obtuse_triangle;
		}
		else
		{
			++acute_triangle;
		}
	}
	cout << triangle << " " << right_triangle << " " << acute_triangle << " " << obtuse_triangle << endl;
}

int main()
{
	solve();
	return(0);
}