20250617 baekjoon python

This commit is contained in:
songyc macbook 2025-06-17 16:33:35 +09:00
parent 2ca620b79e
commit 25d410a665
8 changed files with 46 additions and 0 deletions

View File

@ -0,0 +1,9 @@
a,b,c = map(int, [input(), input(), input()])
if a+b+c != 180 :
print("Error")
elif a==b==c :
print("Equilateral")
elif a==b or a==c or b==c :
print("Isosceles")
else :
print("Scalene")

View File

@ -0,0 +1,2 @@
x, y, w, h = map(int, input().split())
print(min(x,y,w-x,h-y))

View File

@ -0,0 +1,3 @@
a, b, c = map(int, input().split())
m, s = max(a,b,c), sum([a,b,c])
print(s if 2*m < s else 2 * (s - m) - 1)

View File

@ -0,0 +1 @@
print(int(input())*4)

View File

@ -0,0 +1 @@
print(int(input())*int(input()))

View File

@ -0,0 +1,7 @@
x=0
y=0
for _ in range(3) :
a, b = map(int, input().split())
x ^= a
y ^= b
print(x,y)

View File

@ -0,0 +1,13 @@
while(True) :
a,b,c = map(int, input().split())
if a==b==c==0 :
break
if 2 * max(a,b,c) >= sum([a,b,c]) :
print("Invalid")
elif a==b==c :
print("Equilateral")
elif a==b or a==c or b==c :
print("Isosceles")
else :
print("Scalene")

View File

@ -0,0 +1,10 @@
for i in range(int(input())) :
if i==0 :
xMin, yMin = map(int, input().split())
xMax, yMax = xMin, yMin
continue
x, y = map(int, input().split())
xMin, yMin, xMax, yMax = min(x,xMin), min(y,yMin), max(x,xMax), max(y,yMax)
print((xMax-xMin)*(yMax-yMin))