Go: ///
// File:  0582.go
// Author: ymiyamoto
//
// Created on Wed Feb 28 22:51:48 2018
//
package main

import (
	"bufio"
	"fmt"
	"os"
)

const (
	steep = iota
	orth
	obtuse
)

func max(a, b, c int) (int, int, int) {
	if a < b {
		if b < c {
			return c, a, b
		} else {
			return b, c, a
		}
	} else {
		if a < c {
			return c, a, b
		} else {
			return a, b, c
		}
	}
}

func triangle(a, b, c int) int {
	if a*a == b*b+c*c {
		return orth
	} else if b*b+c*c-a*a > 0 {
		return steep
	} else {
		return obtuse
	}
}

func main() {
	s := bufio.NewScanner(os.Stdin)

	var num, st, or, ob int
	for s.Scan() {
		var a, b, c int
		fmt.Sscan(s.Text(), &a, &b, &c)

		m, n1, n2 := max(a, b, c)
		if m < n1+n2 {
			switch triangle(m, n1, n2) {
			case steep:
				st++
			case orth:
				or++
			case obtuse:
				ob++
			}
			num++
		} else {
			break
		}
	}
	fmt.Println(num, or, st, ob)
}

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 = 0
b = 0
c = 0

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

Python: import sys
num = 0
triangle = {"chokkaku":0,"eikaku":0,"donkaku":0}
henn = sys.stdin.readlines()
for i in henn:
    hen = list(map(int,i))
    hen.sort()
    if (hen[0] + hen[1] <= hen[2]) or (hen[1] + hen[2] <= hen[0]) or (hen[2] + hen[0] <= hen[1]):
        break
    else:
        num += 1
        if hen[0]**2 + hen[1] ** 2 == hen[2] **2:
            triangle["chokkaku"] += 1
        elif hen[0] ** 2 + hen[1] ** 2 < hen[2] **2:
            triangle["donkaku"] += 1
        else:
            triangle["eikaku"] += 1

kotae = str(num)+" "+" ".join(list(map(str,triangle.values())))
print(kotae)

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
    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
while(tflag==1):
    for i in range(len(lista)):
        x=sorted(lista[i])
        func01(x[0],x[1],x[2])
print(t,ch,e,d)

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

Python: import sys
import fileinput
import math
from collections import Counter
from decimal import Decimal

RADIAN180 = math.pi
ANGLE90 = 90

counter = Counter()


def is_triangle(edges):
    return edge[0] + edge[1] > edge[2] and \
           edge[1] + edge[2] > edge[0] and \
           edge[2] + edge[0] > edge[1]


def calculate_radian(edges):
    edge.sort()
    radian = []

    s = sum(edge) / 2
    s = Decimal.sqrt(s * (s - edge[0]) * (s - edge[1]) * (s - edge[2]))
    h = 2 * s / edge[2]

    radian.append(math.asin(h / edge[0]))
    radian.append(math.asin(h / edge[1]))

    radian.append(RADIAN180 - sum(radian))

    return radian


for input_list in fileinput.input():

    edge = [Decimal(item) for item in input_list.split(" ")]

    if is_triangle(edge):

        counter["ALL"] = counter["ALL"] + 1

        radian = calculate_radian(edge)

        max_radian = max(radian)
        max_angle = Decimal(math.degrees(max_radian))
        max_angle = max_angle.quantize(Decimal("1.0"))

        if max_angle < ANGLE90:
            counter["ACUTE"] += 1
        elif max_angle == ANGLE90:
            counter["RIGHT"] += 1
        else:
            counter["OBTUSE"] += 1
    else:
        for garbage in sys.stdin:
            pass
        break

print(counter['ALL'], counter["RIGHT"], counter["ACUTE"], counter["OBTUSE"])

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: ss = input()
print(ss)

Python: def triangle(a, b, c):
    if a+b > c and b+c > a and c+a > b:
        if a**2 == b**2 + c**2:
            return 0
        elif a**2 < b**2 + c**2:
            return 1
        elif a**2 > b**2 + c**2:
            return 2
    else:
        return 3

ans = [0] * 3
while True:
    try:
        a, b, c = sorted(map(int, input().split()))[::-1]
        ans[triangle(a, b, c)] += 1
    except:
        break
print(sum(ans), *ans)

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("\n").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: result = [0]*3
while True:
    a, b, c = sorted(map(int, input().split()))
    if a + b <= c:
        print(sum(result),*result)
        break
    flag = a ** 2 + b ** 2 - c*c
    if flag == 0:
        result[0] +=1
    elif flag >0:
        result[1] += 1
    else:
        result[2] += 1

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


def checkOct(a, b, c):
    a, b, c = [i * i for i in [a, b, c]]
    if a + b == c or a + c == b or b + c == a:
        return 0
    elif c < a + b or b < a + c or a < b + c:
        return 1
    else:
        return 2

for i in range(5):
    #a, b, c = map(int, input())
    result = [0] * 3
    if checkTriangle(a, b, c):
        result[checkOct(a, b, c)] += 1
print(sum(result),*result)

Python: ans = [0 for i in range(4)]
while True:
  sides = sorted([int(input()) for i in range(3)])
  if sides[2] >= sides[1] + sides[0]:
    print(ans[0], ans[1], ans[2], ans[3])
    break
  if sides[2]**2 >= sides[1]**2 + sides[0]**2:
    ans[3]+=1
  elif sides[2]**2 == sides[1]**2 + sides[0]**2:
    ans[2]+=1
  else:
    ans[1]+=1