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)
}

Python: sankaku = 0
eikaku = 0
donkaku = 0
chokkaku = 0

for xi in range(1, 10000000000000000):
    inline = input().split()
    a, b, c = (int(xi) for xi in inline)
    if c <a:
        sub = a
        a = c
        c = sub
    if c <b:
        sub = b
        b = c
        c = sub
    if c >= a + b:
        break

    c2 = c**2
    b2 = b**2
    a2 = a**2

    if c2 == b2+a2:
        chokkaku += 1

    if c2 < b2+a2:
        eikaku += 1

    if c2 > b2+a2:
        donkaku += 1

    sankaku += 1

print(sankaku, chokkaku, eikaku, donkaku)

Python: ans_n = 0
ans_a = 0
ans_r = 0
ans_o = 0
while True:
    #辺の長さの入力
    a, b, c = map(int, input().split())
    #辺の長さの並び替え
    l = sorted([a, b, c])
    f = l[0]
    s = l[1]
    t = l[2]
    #ここから条件分岐
    if t >= f + s:
        break
    elif t ** 2 < f ** 2 + s ** 2:
        ans_n += 1
        ans_a += 1
    elif t ** 2 == f ** 2 + s ** 2:
        ans_n += 1
        ans_r += 1
    elif t ** 2 > f ** 2 + s ** 2:
        ans_n += 1
        ans_o += 1
print(str(ans_n) + " " + str(ans_r) + " " + str(ans_a) + " " + str(ans_o))

Python: sankaku = 0
tyokkaku = 0
eikaku = 0
donkaku = 0
while True:
    inputed_line = input()
    data_str = inputed_line.split(' ')
    data = [int(i) for i in data_str]
    data.sort()
    if data[-1] < data[0] + data[1]:
        sankaku += 1
        if data[-1] ** 2 == data[0] ** 2 + data[1] ** 2:
            tyokkaku += 1
        elif data[-1] ** 2 < data[0] ** 2 + data[1] ** 2:
            eikaku += 1
        elif data[-1] ** 2 > data[0] ** 2 + data[1] ** 2:
            donkaku += 1
    else:
        break

answer_list = [sankaku, tyokkaku, eikaku, donkaku]
answer_list_str = [str(i) for i in answer_list]
answer_str = ' '.join(answer_list_str)
print(answer_str)

Python: lista=[]
t=0
ch=0
e=0
d=0
tflag=1
while True:
    try:
        lista.append(list(map(int,input().split())))
    except:
        break;

def func01(a,b,c):
    global t
    global ch
    global e
    global d
    global tflag
    if a+b>c:
        t+=1
        if a**2+b**2==c**2:
            ch+=1
        elif a**2+b**2>c**2:
            e+=1
        elif a**2+b**2<c**2:
            d+=1
    else:
        tflag=0
        
i=0
for i in range(len(lista)):
    if len(lista)==i:
        break
    x=sorted(lista[i])
    func01(x[0],x[1],x[2])
    if tflag==0:
        break
    i+=1
print(t,ch,e,d)

Python: tri = {} # 1: normal, chokkaku, eikaku donkaku
for i in range(4) :
    tri[i + 1] = 0
    
while(True) :
    l = sorted(map(int, input().split()), reverse=True)
    a, b, c = l[0], l[1], l[2]
    
    if a >= b + c :
        break
    else :
        if b ** 2 + c ** 2 == a ** 2:
            tri[1] += 1
        elif b ** 2 + c ** 2 > a ** 2:
            tri[2] += 1
        else :
            tri[3] += 1
            
print(sum(tri.values()), tri[1], tri[2], tri[3])

Python: al=0
tyo=0
ei=0
don=0

while True:
    s=list(map(int,input().split())) 
    s.sort(reverse=True)
    if s[0]+s[1]>s[2] and s[1]+s[2]>s[0] and s[2]+s[0]>s[1]:
        al+=1
        tmp=s[0]*s[0]-(s[1]*s[1]+s[2]*s[2])
        if tmp==0:
           tyo+=1
        elif tmp<0:
            ei+=1
        else:
            don+=1
    else:
        print(al,tyo,ei,don)
        break

Python: def run():
    judge = [0, 0, 0, 0]
    while True:
        a, b, c = (int(x) for x in sorted(input().split()))
        if a + b <= c or min([a, b, c]) <= 0:
            print(' '.join(map(str, judge)))
            print()
            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: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0582

"""
import sys
from sys import stdin
from math import asin, pi, sqrt, degrees
input = stdin.readline


def main(args):
    triangle = 0                #  ????§???¢?????°
    right_triangle = 0          #  ??´?§?????§???¢
    acute_triangle = 0          #  ????§?????§???¢
    obtuse_triangle  = 0        #  ????§?????§???¢
    while True:
        lines = [int(x) for x in input().split()]
        lines.sort()
        a, b, c = lines[0], lines[1], lines[2]
        if a + b <= c:
            break
        triangle += 1

        if a**2 + b**2 == c**2:
            right_triangle += 1
            continue
        s = (a + b + c) / 2
        area = sqrt(s * (s - a) * (s - b) * (s - c))
        h = (2 * area) / c
        A = degrees(asin(h / b))
        B = degrees(asin(h / a))
        C = 180 - (A + B)
        if A < 90 and B < 90 and C < 90:
            acute_triangle += 1
        else:
            obtuse_triangle += 1

    print(triangle, right_triangle, acute_triangle, obtuse_triangle)


if __name__ == '__main__':
    main(sys.argv[1:])

Python: def triangle():
    # 直角三角形の成立条件
    if length[0]**2 == length[1]**2 + length[2]**2:
        n[0] += 1; n[1] += 1
    # 鋭角三角形の成立条件
    elif length[0]**2 < length[1]**2 + length[2]**2:
        n[0] += 1; n[2] += 1
    # 鈍角三角形の成立条件
    elif length[0]**2 > length[1]**2 + length[2]**2:
        n[0] += 1; n[3] += 1
    
    return n

def print_n():
    for i, num in enumerate(n):
        if i == len(n) - 1:
            print(num)
        else:
            print(num, end=' ')

n = [0, 0, 0, 0]
while True:
    length = sorted(list(map(int, input().split())), reverse=True)
    # 三角形の成立条件
    if length[0] < length[1] + length[2]\
    and length[1] < length[0] + length[2]\
    and length[2] < length[1] + length[0]:
        n = triangle()
    else:
        break
print_n()

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