Go: package main

import (
	"fmt"
	"sort"
)

// TriangleKind kind of triangle
type TriangleKind int

const (
	// Nothing not triangle
	Nothing TriangleKind = iota
	// RightTriangle the right triangle
	RightTriangle
	// SharpTriangle the sharp triangle
	SharpTriangle
	// ObtuseTriangle the obtuse triangle
	ObtuseTriangle
) // const for Triangle kind

type result struct {
	rTriangle int
	sTriangle int
	oTriangle int
}

func (res *result) String() string {
	return fmt.Sprintf("%d %d %d %d", res.rTriangle+res.sTriangle+res.oTriangle, res.rTriangle, res.sTriangle, res.oTriangle)
}

func checkTriangleType(a int, b int, c int) TriangleKind {
	p := []int{a, b, c}
	sort.Sort(sort.IntSlice(p))
	if !(p[0]+p[1] > p[2] && p[1]+p[2] > p[0] && p[2]+p[0] > p[1]) {
		return Nothing
	}

	c = (p[0] * p[0]) + (p[1] * p[1]) - (p[2] * p[2])
	if c == 0 {
		return RightTriangle
	}
	if c > 0 {
		return SharpTriangle
	}
	return ObtuseTriangle
}

func main() {
	var res = new(result)
	var a, b, c int
	var hasNext = true
	for hasNext {
		fmt.Scanf("%d %d %d", &a, &b, &c)
		switch checkTriangleType(a, b, c) {
		case Nothing:
			hasNext = false
		case RightTriangle:
			res.rTriangle++
		case SharpTriangle:
			res.sTriangle++
		case ObtuseTriangle:
			res.oTriangle++
		}
	}
	fmt.Println(res.String())
}

Python: import sys
from enum import Enum, auto

class Triangle(Enum):
    NOTRIANGLE = 0
    ACUTE = 1
    RIGHT = 2
    OBTUSE = 3

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 Triangle.NOTRIANGLE
    if e1 < e2 + e3: return Triangle.NOTRIANGLE
    if e1**2 == e2**2 + e3**2: return Triangle.RIGHT
    elif e1**2 < e2**2 + e3**2: return Triangle.ACUTE
    elif e1**2 > e2**2 + e3**2: return Triangle.OBTUSE

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

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: 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 1
    elif e1**2 < e2**2 + e3**2: return 2
    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

Python: a,b,c,d = 0,0,0,0
while 1:
	lng=list(map(int,input().split()))
	lng.sort()
	if lng[0] + lng[1] <= lng[2]:
		print('%d %d %d %d' % (a,b,c,d))
		break
	else:
		a += 1
		if lng[0]**2 + lng[1]**2 == lng[2]**2:
			b += 1
		elif lng[0]**2 + lng[1]**2 <= lng[2]**2:
			d += 1
		else:
			c += 1

Python: a,b,c,d = 0,0,0,0
while 1:
	lng=list(int(input().split()))
	lng.sort()
	if lng[0] + lng[1] <= lng[2]:
		print('%d %d %d %d' % (a,b,c,d))
		break
	else:
		a += 1
		if lng[0]**2 + lng[1]**2 == lng[2]**2:
			b += 1
		elif lng[0]**2 + lng[1]**2 >= lng[2]**2:
			d += 1
		else:
			c += 1

Python: A =[] 
while True:
    try:
        A.append(sorted(list(map(int,input().split())),reverse=True))

    except:
        break
        #または、quit(),os.exit()をして止める。


def triangle_types(X):
    print(X)
    num_of_acute = 0
    num_of_right = 0
    num_of_obtuse = 0
    num_of_normal = 0
    for i in range(len(X)):
        a,b,c = [j for j in X[i]]
        ans = b**2 + c**2 - a**2
        if (a < b + c):
            num_of_normal+=1
            if (ans > 0):
                num_of_acute+=1
            elif (ans == 0):
                num_of_right+=1
            elif (ans < 0):
                num_of_obtuse+=1
            else:
                print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
                return
        else:
            print("{} {} {} {}".format(num_of_normal,num_of_right,num_of_acute,num_of_obtuse))
            return
    
if __name__ == '__main__':
    triangle_types(A)

Python: i, j, k, l = 0, 0, 0, 0

while True:
    # 引数:0 == AB, 1 == BC, 2 == CA と仮定
    listTRI = [int(i) for i in input().split()]
    sumList = sum(listTRI)
    # 三角形が不成立でbreak
    if min(listTRI) <= 0:
        break
    if sumList - max(listTRI) <= max(listTRI):
        break
    # 辺の最大値のインデックス取得
    maxIND = listTRI.index(max(listTRI))
    # 余弦定理を用いて、最大の辺の「対角のcos」を求める
    # 全ての辺の2乗の合計 から 一番長い辺の2乗を2回引く
    cos1 = sum(map(lambda x: x ** 2, listTRI)) - ((listTRI[maxIND] ** 2) * 2)
    # 全ての辺の2倍の合計　から　一番長い辺の2倍を引く
    cos2 = sumList * 2 - (listTRI[maxIND] * 2)
    # cos1 と cos2を割った結果
    cosTRI = cos1 / cos2
    # cosTRIが正なら鋭角、0なら直角、負なら鈍角
    if cosTRI < 0:
        i += 1
        l += 1
    elif 0 < cosTRI :
        i += 1
        k += 1
    else:
        i += 1
        j += 1

print(i, j, k, l)

Python: def t_check(a,b,c):
    if a + b > c:
        if b + c > a:
            if a + c > b: return True
    return False

def f_check(a_, b_, c_):
    tmp = []
    tmp.append(a_)
    tmp.append(b_)
    tmp.append(c_)
    sqrts = []
    for i in range(3):
        sqrts.append(tmp[i]**2)
    m = max(sqrts)
    s = sum(sqrts)

    if m == (s - m): return(0)
    if m > (s - m): return(2)
    if m < (s - m): return(1)
    
counter=[0,0,0]
    
while(1):
    input_f = input()

    t = input_f.split()
    fn, sn, tn = int(t[0]),int(t[1]),int(t[2])
    if t_check(fn,sn,tn):
        counter[f_check(fn,sn,tn)] += 1
    else: break
    
print(sum(counter),counter[0], counter[1], counter[2])

Python: import numpy
import re
import math

def main():
	"""
	テストコード実行
	:return:
	"""
	tri = acu = obt = rig = 0
	while True:
		a, b, c = sorted(map(int, input().split()), reverse=True)
		if abs(b - c) < a < b + c:
			tri += 1
			if (b ** 2 + c ** 2 - a ** 2) > 0: acu += 1
			elif (b ** 2 + c ** 2 - a ** 2) == 0: rig += 1
			elif (b ** 2 + c ** 2 - a ** 2) < 0: obt += 1
		else:
			print(" ".join([str(tri), str(acu), str(obt), str(rig)]))
			exit()
if __name__ == '__main__':
	main()

Python: acute=0
right=0
obtuse=0

while True:
    a, b, c = map(int, input().split())
    e = sorted([a, b, c])
    a, b, c = (e[0], e[1], e[2])
    if a + b < c:
        break
    elif a**2 + b**2 > c**2:
        acute += 1
    elif a**2 + b**2 == c**2:
        right += 1
    else:
        obtuse += 1
print(acute+right+obtuse, right, acute, obtuse)

Python: #input_f = "3 4 5\n2 1 2\n6 3 4\n1 1 1\n1 2 3"
def t_check(a,b,c):
    if a + b > c:
        if b + c > a:
            if a + c > b: return True
    return False



def f_check(a_, b_, c_):
    tmp = []
    tmp.append(a_)
    tmp.append(b_)
    tmp.append(c_)
    sqrts = []
    for i in range(3):
        sqrts.append(tmp[i]**2)
    m = max(sqrts)
    s = sum(sqrts)

    if m == (s - m): return(0)
    if m > (s - m): return(2)
    if m < (s - m): return(1)
    
    
counter=[0,0,0]
    
    
while(1):
    input_f = input()


    t = input_f.split("\n")[i].split()
    fn, sn, tn = int(t[0]),int(t[1]),int(t[2])
    if t_check(fn,sn,tn):
        counter[f_check(fn,sn,tn)] += 1
    else: break
    

print(sum(counter),counter[0], counter[1], counter[2])