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: aa= 0; ab= 0; ac=0
while True :
    edge = map(int, input().split())
    sEdge = sorted(edge)
    a = sEdge[0]
    b = sEdge[1]
    c = sEdge[2]
    if c >= a + b :
        break
    jud = c ** 2 - a ** 2 - b ** 2
    if jud == 0 :
        aa += 1
    elif jud < 0 :
        ab += 1
    else :
        ac += 1
print("{} {} {} {}".format(aa + ab + ac, aa, ab, ac))

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])
    break
print(t,ch,e,d)

Python: print(1)

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)