chore: migrate

This commit is contained in:
2025-12-21 09:59:04 +07:00
commit 23372fe602
10 changed files with 88 additions and 0 deletions
+4
View File
@@ -0,0 +1,4 @@
f = float(input())
c = (f-32)*5/9
k = c + 273.15
print("%g %g" % (c, k), sep=' ')
+4
View File
@@ -0,0 +1,4 @@
ip = float(input())
k = 0.453592/2.54/2.54
op = ip*k
print("%g" % op)
+5
View File
@@ -0,0 +1,5 @@
xxx, yy = [int(i) for i in input().split()]
for i in range(0, xxx + 1):
if 2*i + 4*(xxx - i) == yy:
print(i, xxx - i)
break
+19
View File
@@ -0,0 +1,19 @@
import math
epsilon = 1E-10
a = float(input())
b = float(input())
c = float(input())
if (a + b > c and b + c > a and c + a > b):
p = (a + b + c)/2
s = round(math.sqrt(p*(p-a)*(p-b)*(p-c)), 2)
if (a == b or b == c or c == a):
if (a == b and b == c):
print("Tam giac deu, dien tich = %g" % s)
else:
print("Tam giac can, dien tich = %g" % s)
elif (abs(a*a + b*b - c*c) < epsilon or abs(b*b + c*c - a*a) < epsilon or abs(c*c + a*a - b*b < epsilon)):
print("Tam giac vuong, dien tich = %g" % s)
else:
print("Tam giac thuong, dien tich = %g" % s)
else:
print("Khong phai tam giac")
+30
View File
@@ -0,0 +1,30 @@
n = int(input())
k = int(input())
p = int(input())
q = int(input())
alice = 2*(p - 1) + q
bob = alice - k
b = False
if (bob > 0):
b = True
v = bob % 2
if v == 0:
v = 2
pass
u = (bob - v)/2 + 1
else:
bob = alice + k
if (bob <= n):
b = True
v = bob % 2
if v == 0:
v = 2
pass
u = (bob - v)/2 + 1
pass
if b:
u = int(u)
v = int(v)
print(u, v)
else:
print(-1)
+5
View File
@@ -0,0 +1,5 @@
k, t = [int(i) for i in input().split()]
r = t % (2*k)
if (r > k):
r = 2*k - r
print(r)
+8
View File
@@ -0,0 +1,8 @@
import math
ip = int(input())
sum = 0
for i in range(1, ip):
if (ip % i == 0):
sum += i
print(sum)
+8
View File
@@ -0,0 +1,8 @@
x = int(input())
if x in range(1, 31):
array = [1 for x in range(x)]
for i in range(2, x):
array[i] = array[i - 1] + array[i - 2]
print(array[x - 1])
else:
print("So %d khong nam trong khoang [1,30]." % x)
+5
View File
@@ -0,0 +1,5 @@
n, m = [int(i) for i in input().split()]
op = 0
if (n > 1 and m > 1):
op = int((n - 1)*n/2 + (m - 2)*(m-1)/2)
print(op)
View File