Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	d := 0
	e := 0
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		a, _ := strconv.Atoi(info[0])
		b, _ := strconv.Atoi(info[1])
		c, _ := strconv.Atoi(info[2])
		if a*a + b*b == c*c {
			d++
		}
		if a == b {
			e++
		}
	}
	fmt.Println(d)
	fmt.Println(e)
}

Python: import math
num1=0                                          #長方形の数                                                 
num2=0                                          #ひし形の数
while True:
    try:
        a,b,c=list(map(int, input().split(",")))
    except:
        break
    
    if pow(a,2)+pow(b,2)==pow(c,2):
        num1+=1
    elif a==b and a+b>c:
        num2+=1

print(num1)
print(num2)

Python: import sys
def main():
    ans = [0] * 2
    for line in sys.stdin:
        try:
            a,b,c = map(int, line.split())
            if a ** 2 + b ** 2 == c ** 2:
                ans[0] += 1
            else:
                ans[1] += 1

            for a in ans:
                print(a)

        except EOFError:
            for a in ans:
                print(a)


if __name__ == "__main__":
    main()

Python: import sys
t, h = 0, 0
for line in sys.stdin:
    try:
        a, b, c = line.split(",")
        if not int(a) ** 2 + int(b) ** 2 - int(c) ** 2:
            t += 1
        elif int(a) == int(b):
            h += 1
    except:
        break
print(t)
print(h)

Python: import sys
j = []
for line in sys.stdin:
    try:
        a, b, c = line.split(",")
        if int(a) ** 2 + int(b) ** 2 - int(c) ** 2 >= 0:
            j += [int(a)**2 + int(b)**2 - int(c)**2]
    except:
        break
print(len([i for i in j if not i]))
print(len([i for i in j if i]))

Python: rec = 0
rod = 0
E = 10**-10
while(1):
    try:
        a,b,c = [int(i) for i in input().split(",")]
        if abs(c**2 - (a**2+b**2)) < E:
            rec += 1
        elif a == b:
            rod += 1
    except EOFError:
        print(rec)
        print(rod)
        break

Python: import sys
def main():
    ans = [0] * 2
    for line in sys.stdin:
        try:
            a,b,c = map(int, line.split())
            if a ** 2 + b ** 2 == c ** 2:
                ans[0] += 1
            else:
                ans[1] += 1

        except EOFError:
            for a in ans:
                print(a)


if __name__ == "__main__":
    main()

Python: # 0032
import sys
n1 = n2 = 0
for _ in sys.stdin:
    a, b, c = map(int, line.split(','))
    if a**2 + b**2 == c**2:
        n1 += 1
    elif a == b:
        n2 += 1
print(n1)
print(n2)

Python: import sys
c1 = 0
c2 = 0
for line in sys.stdin.readlines():
  a,b,c = map(int,line.split(','))
  if a**2 + b**2 == c ** 2:
    c1 += 1
  if a == b:
    c2 += 1
print(c1)
print(c2)

Python: n_rect = 0
n_dia = 0
while True:
    try:
        a,b,c = map(int, input().split(','))
        if a**2 + b**2 == c**2:
            n_rect += 1
        if a == b:
            n_dia += 1
    except EOFError:
        break

print(n_rect) 
print(n_dia)

Python: import sys
j = [int(a)**2 + int(b)**2 - int(c)**2 for line in sys.stdin for a,b,c in line.split()]
print(len([i for i in j if not i]))
print(len([i for i in j if i]))

Python: import sys
c=[]
l=[list(map(int,t.split(","))) for t in sys.stdin]
for i in l:
    if i[0]**2+i[1]**2==i[2]**2:
        c.extend([1])
    elif i[0]==i[1]:
        c.extend([2])
print("{}\n{}".format(
    len([i for i in c if i==1]),
    len([i for i in c if i==2])
    ))

Python: import sys
r = d = 0
for e in sys.stdin:
  a, b, c = map(int, e.split(','))
  if a * a + b * b == c * c:
    r += 1
  if a == b:
    d += 1
print(r)
print(d)

Python: import sys

rect = 0
dia = 0
for line in sys.stdin:
    a,b,c = [int(i) for i in line.split(",")]
    if a**2 + b**2 == c**2:
        rect += 1
    if a == b:
        dia += 1

print(rect)
print(dia)

Python: # 0032
n1 = n2 = 0
while True:
    try:
        a, b, c = map(int, input().split(','))
        if a**2 + b**2 == c**2:
            n1 += 1
        elif a == b:
            n2 += 1
    except EOFError: break
print(n1)
print(n2)

Python: import sys
f = sys.stdin
 
rhombus = oblong = 0
for line in f:
    a, b, c = map(int, line.split(','))
    if a == b:
        rhombus += 1
    if a * a + b * b == c * c:
        oblong += 1
 
print(oblong)
print(rhombus)

Python: tyo = 0
hisi = 0
while True:
    try:
        a,b,c = map(int, input().split(","))
        if c**2 == a**2+b**2 : tyo += 1
        if a == b: hisi += 1
    except EOFError:
        break
print(tyo)
print(hisi)

Python: import sys

rect = 0
rhom = 0
for line in sys.stdin:
  try:
    a, b, c = [int(i) for i in line.split(',')]
    if a**2 + b**2 == c**2:
      rect += 1
    elif a == b:
      rhom += 1
  except:
    break
print(rect)
print(rhom)

Python: def main():
    Rec = 0
    Dia = 0
    while True:
        try:
            a,b,c = map(int,input().split(","))
            if a == b:
                Dia += 1
            elif a != b and c > a and c > b:
                Rec += 1
        except EOFError:
            break
    print(Rec)
    print(Dia)

if __name__ == '__main__':
    main()

Python: import sys

c1 = c2 = 0
for line in sys.stdin:
    a, b, c = map(int, line.split(','))
    if a**2 + b**2 == c**2:
        c1 += 1
    elif a == b:
        c2 += 1
print(c1)
print(c2)

Python: def main():
    Rec = 0
    Dia = 0
    while True:
        try:
            a,b,c = map(int,input().split(","))
            if a == b:
                Dia += 1
            elif a**2 + b**2 == c**2:
                Rec += 1
        except EOFError:
            break
    print('{}\n{}'.format(Rec,Dia))

if __name__ == '__main__':
    main()

Python: 
import sys,math
countrect = 0
countloze = 0
for line in sys.stdin.readlines():
   x , y , d1 = map(int,line.split(','))
   if x == y:
       d2 = 4*x*x - d1*d1
       if d1*d1 + d2 == 4*x*x:
           countloze += 1
   else:
       if x*x + y*y == d1*d1:
           countrect += 1
print(countrect)
print(countloze)

Python: import sys

def solve():
    num_rect, num_rhom = 0, 0
    for line in sys.stdin:
        a, b, c = map(int, line.split(','))
        if c ** 2 == a ** 2 + b ** 2:
            num_rect += 1
        elif a == b:
            num_rhom += 1
    
    print(num_rect)
    print(num_rhom)

if __name__ == "__main__":
    solve()

Python: import sys
f = sys.stdin

rhombus = oblong = 0
for line in f:
    a, b, c = map(int, line.split(','))
    if a == b:
        rhombus += 1
    if a * a + b * b == c * c:
        oblong += 1

print(oblong)
print(rhombus)

Python: hisi = 0
tyou = 0
while True:
    try:
        a,b,c = map(int,input().split(","))
        if a == b:
            hisi += 1
        elif a ** 2 + b ** 2 == c ** 2:
            tyou += 1
    except EOFError:
        print(tyou)
        print(hisi)
        break

Python: # coding=utf-8


def is_rect(quadr):
    if quadr[0]**2 + quadr[1]**2 == quadr[2]**2:
        return True
    return False


def is_rhombus(quadr):
    if quadr[0] == quadr[1]:
        return True
    return False


if __name__ == '__main__':
    counter_list = [0, 0]
    while True:
        try:
            quadr = list(map(int, input().split(',')))
            if is_rect(quadr):
                counter_list[0] += 1
            if is_rhombus(quadr):
                counter_list[1] += 1
        except EOFError:
            break
    print(counter_list[0])
    print(counter_list[1])

Python: from sys import stdin

na = 0
nb = 0
while(True):
    try:
        a,b,c = map(int,stdin.readline().split(","))
        if a**2+b**2==c**2:
            na += 1
        if a==b:
            nb += 1
    except:
        break
print(na)
print(nb)