TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n=int(input("enter k")) 
x=0
if n%2==0:
    x=(n/2)**2
else:
    x=((n//2)+1)*(n//2)
print(x)

k=input()  
odd=1
even=0
for i in range(2,k+1) 
     if i%2==0:
        even+=1
     else:
           odd+=1
print(odd*even)

from sys import stdin,stdout

def main():
    line=stdin.readline()
    parts=line.split()
    a=int(parts[0])
    par=int(a/2)
    impar=int(a/2)+a%2
    stdout.write(par*impar)
main()

n=int(input("enter k")) 
if n%2==0:
    x=(n/2)**2
else:
    x=((n//2)+1)*(n//2)
print(x)

x =int(input())

y=x//2

if (y%2==0):
    print (y**2)
elif print ((y**2)+1)

k=input()
pair=0
for i in range(1,k+1):
     for j in range (2,k+1)
          if i%2==0 and j%2!=0:
              pair+=1
         ELIF i%2!=0 and j%2==0 :
               pair+=1
          else:
                pass
print(pair)
                        




k = int(input())
if k%2 == 0:
    print((k/2)*(k/2))

else:
    print(((k-1)/2)*(((k-1)/2)-k))

N=int(input("enter number")) 
even=0
odd=0
if N%2==0:
    even=N/2
    odd=N/2
elif N=0:
    even=1
    odd=1
else:
    even=N//2
    odd=(N//2) +1
Print(even*odd)
Comment in Mark

k = int(input())

even = k%2 == 0
ans = k >> 1

if even:
    ans **= 2
else:
    ans *= (ans+1)

print(ans)

Verdicts: Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())
print(k * (k // 2) // 2)


k = int(input())
cnt = 0
for i in range(1, k + 1):
    for j in range(1, k + 1):
        if i % 2 != j % 2:
            cnt += 1
print(cnt // 2)


Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K=int(input())
if K%2==0:
  print(K//2*K//2)
else:
  print((K//2+1)*K//2)

K=int(input())
if K%2==0:
  print(K//2*K//2)
else:
  print((K//2+1)*(K//2))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n = int(input())

if n%2 == 0:
  print((n//2)**2)
else:
  print(n//2*(n//2-1))


n = int(input())

if n%2 == 0:
  print((n//2)**2)
elif n > n//2*2:
  print(n//2*(n//2+1))
else:
  print(n//2*(n//2-1))


Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K=int(input())
if K%2==0:
  print(K*K/4)
else:
  print((K+1)*(K-1)/4)

K=int(input())
if K%2==0:
  print(int(K*K/4))
else:
  print(int((K+1)*(K-1)/4))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n=int(input())
print((k//2)*((k+1)//2))

n=int(input())
print((k//2)*(k//2+1))

k=int(input())
print((k//2)*((k+1)//2))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
N, K = [int(i) for i in input().split()]

cnt = 0

for a in range(1,N+1):
    for b in range(1,N+1):
        if (a+b) % K !=0:
            continue
        else:
            for c in range(1,N+1):
                if (a+c) % K !=0 || (b+c) % K !=0:
                    continue
                cnt = cnt+1

print(cnt)

k = int(input())
q = k // 2
m = k %  2

k_odd  = q + m
k_even = q

ans = k_odd * k_even
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
x1,y1,x2,y2 = map(int, input().split())
ylen = y2 - y1
xlen = x2 - x1

x3 = x2 - ylen
y3 = y2 + xlen
x4 = x3 - xlen
y4 = y3 - ylen

print(str(x3) + " " + str(y3) + " " + str(x4) + " " + str(y4)) 

K = int(input())
 
if K % 2 == 0:
  answer = (K / 2)**2
else:
  answer = ((K + 1) / 2)**2
 
print(int(answer))

K = int(input())

if K % 2 == 0:
  answer = (K % 2)^2
else:
  answer = ((K + 1) % 2))^2

print(answer)

K = int(input())
 
if K % 2 == 0:
  answer = (K / 2)**2
else:
  answer = ((K + 1) / 2)**2 - ((K + 1) / 2)
 
print(int(answer))

Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
a = K // 2
print(a)
if K%2 ==1:
    print(a * (a+1))
else:
    print(a ** 2)

K = int(input())
a = K // 2
if K%2 ==1:
    print(a * (a+1))
else:
    print(a ** 2)

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())

if k%2 == 0:
  print(k*k/4)
else:
  print(k**2/4-1/4)

k = int(input())
 
if k%2 == 0:
  print(int(k*k/4))
else:
  print(int(k**2/4-1/4))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
N = int(input())

if N% == 0:
  print((N//2)**2)
else:
  print(((N+1)//2)*((N-1)//2))

N = int(input())

if N %2 == 0:
  print((N//2)**2)
else:
  print( ((N+1)//2) * ((N-1)//2) )


Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
a=int(input());print(a*a//4+a//2if a%2>0else a*a//4)

a=int(input());print(a*a-a)

a=int(input())//2;print(a*a-a if a%2>0else a*a)

a=int(input());print(a//2*(a//2+1)if a%2>0else a*a//4)

Verdicts: Wrong Answer

Wrong Answer

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
if K % 2 == 0:
    print((K/2)**2)
else:
    print((k//2+1)*(k//2))


K = int(input())
if K % 2 == 0:
    print(int((K/2)**2))
else:
    print(int((K//2+1)*(K//2)))


Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
N = int(input())
if N % 2 ==0:
  print((N/2)**2)
else:
  print(((N-1)/2)*(1+(N-1)/2))

N = int(input())
if N % 2 ==0:
  print(int((N/2)**2))
else:
  print(int(((N-1)/2)*(1+(N-1)/2)))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())

if K%2 == 0:
    print((K/2)**2)
else:
    print((K+1)/2*(K-1)/2)


K = int(input())

if K%2 == 0:
    print((K/2)**2)
else:
    print(((K+1)/2)*((K-1)/2))


K = int(input())

if K%2 == 0:
    print(int((K/2)**2))
else:
    print(int((K+1)/2*(K-1)/2))

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
a = int(input())
if a%2==0:
  print((a/2)*(a/2))
else:
  print(((a-1)/2)*((a+1)/2))

a = int(input())
if a%2==0:
  print(int((a/2)**2))
else:
  print(int(((a-1)/2)**2)


a = int(input())
if a%2==0:
  print(int((a/2)**2))
else:
  print(int(((a-1)/2)**2))


a = int(input())
if a%2==0:
  print(int((a/2)**2))
else:
  print(int(((a-1)/2)*((a+1)/2)))


Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
if(K%2 == 0):
  print(K/2 * K/2)
else:
  print(K/2 * (K/2-1))



K = int(input())
if K%2 == 0: # is even
  print(int((K/2)*(K/2)))
else:
  print(int((K//2)*(K//2+1)))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
iK = int(input())
if iK % 2 == 0:
  iN = int(iK / 2)
  print(iN * iN)
else :
  iN = int(iK - 1)/2
  print(iN * (iN + 1))


iK = int(input())
if iK % 2 == 0:
  iN = int(iK / 2)
  print(iN * iN)
else :
  iN = int((iK - 1)/2)
  print(iN * (iN + 1))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())

print(K//2)*((K+1)//2)


K = int(input())
print((K+1)//2*K//2)

K = int(input())

(K//2)*((K+1)//2)


K = int(input())
print((K+1)//2*(K//2))

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n = int(input())
print((n/2)*((n+1)/2))

n = int(input())
print(int((n/2))*int((n+1)/2))


Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
N = int(input())
Even = []
Odd = []
for i in range(1,N+1):
    if i % 2 == 0:
        Even.append(i)
    else:
        Odd.append(i)
print(Even * Odd)

N = int(input())
if N % 2 == 0:
    print((N//2)**2)
else:
    print((N//2) * (N//2+1))

Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n=int(input())
if n%2==0:
    print((n//2)*(n//2+1)
else:
    print((n//2)**2)

n=int(input())
if n%2==0:
    print((n//2)*(n//2+1))
else:
    print((n//2)**2)

n=int(input())
if n%2==1:
    print((n//2)*(n//2+1))
else:
    print((n//2)**2)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())

if K%2==0:
	print((K/2)*(K/2))
else:
	print((k-1)*(k-1)/4)

K = int(input())

if K%2==0:
	print((K/2)*(K/2))
else:
	print((K-1)*(K+1)/4)

K = int(input())

if K%2==0:
	print(round((K/2)*(K/2)))
else:
	print(round((K-1)*(K+1)/4))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
a = int(input())
print(k//2 * (k+1)//2)

a = int(input())
print((k//2) * ((k+1)//2))


a = int(input())
print(int(k/2) * int((k+1)/ 2))


a = int(input())
print(int(a/2) * int((a+1)/ 2))


Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K=int(input())
if K%2==0:
  print(K*K//4)
else:
  print(K*(K//2+1)//2)

K=int(input())
if K%2==0:
  print(K*K//4)
else:
  print((K//2)*(K//2+1))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else:
  odd = k
  print(str(even*odd))

k = int(input())

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else
    odd = k
  print(str(even*odd))


k = int(input())

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else:
    odd = k
  print(str(even*odd))


k = int(input())

if k == 0:
  print(0)
else:
  if k%2==0:
    even = k
    odd = k-1
  else:
    even = k - 1
    odd = k
  print(str((even//2)*((odd+1)//2)))


Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n = int(input())
print((n // 2) * (n % 2))

n = int(input())
if n % 2 == 0:
    n //= 2
    print(n * n)
else:
    a = n // 2
    print(a * (n-a))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
print((K/2)*(K/2+1))

K = int(input())
if K % 2 == 1:
    print((K//2)*(K//2+1))
else:
    print((K//2)*(K//2))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n = int(input())
if n % 2 == 0:
  print((n**2)//4)
else:
  print(((n-1)//2) * (n // 2))


n = int(input())
if n % 2 == 0:
  print((n**2)//4)
else:
  print(((n-1)//2) * ((n+1) // 2))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
else:
  print((K+1//2) * ((K-1)//2))

# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
else:
  print((K //2) * ((K-1)//2))

x1,y1,x2,y2 = map(int,input().split())
x3 = y1 - y2
y3 = abs(x1 - x2)
x4 = abs(y2 - y3)
y4 = abs(x2 - x3)
print(x3,y3,x4,y4)

# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
elif K % 2 == 1:
  print((K+1//2) * ((K-1)//2))

x1,x2,y1,y2 = map(int,input().split())
x3 = x2 + (y1 - y2)
y3 = y2 + (x2 - x1)
x4 = y1 + (x2 - x1)
y4 = x1 + (y1 - y2)
print(x3,y3,x4,y4)

# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))

# -*- coding: utf-8 -*-
K = int(input())
if K % 2 == 0:
  print((K//2)*(K//2))
elif K % 2 == 1:
  print(((K+1)//2)*((K-1)//2))

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
if(K%2 == 0):
  print(int((K/2)**2)
else:
  print(int((K/2)*(K/2+1)))

K = int(input())
if(K%2 == 0):
  print(int((K/2)**2))
else:
  print(int((K/2)*(K/2+1)))

K = int(input())
if(K%2 == 0):
  print(int((K/2)**2))
else:
  print(int(((K-1)/2)*((K+1)/2)))

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())

if k%2==0 :
   print(k*k//4)
else :
   print(k*(k+1)//4)

k = int(input())

if k%2==0 :
   print(k*k//4)
else :
   print((k+1)*(k-1)//4)

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())        
    if (k%2) == 0:
        o = (k*(k+1))/2
        e = (k*(k-1))/2
        print(o+e)
    else:
        o = (k*(k-1))/2
        e = (k*(k-1))/2
        print(o+e)

k = int(input())        
if (k%2) == 1:
    oe = ((k+1) * (k-3)) / 8
    print(2 * oe)
else:
    o = (k+2) * (k-2)/8
    e = k * (k-4) / 8
    print(o+e)

k = int(input())        
if (k%2) == 0:
    o = (k*(k+1))/8
    e = (k*(k-1))/8
    print(o+e)
else:
    o = (k*(k-1))/ 4
    e = ((k-1)*(k-2))/4
    print(o+e)


k = int(input())        

if (k%2) == 0:
    o = (k-1) * (k+1) / 8
    
    print(2 * o)

else:
    o = k * (k+2) / 8
    e = (k-2) ** 2 / 8
    print(o+e)

k = int(input())
print(k // 2)


k = int(input())        

if (k%2) == 1:
    o = (k-1) * (k+1) / 8
    
    print(2 * o)

else:
    o = k * (k+2) / 8
    e = (k-2) ** 2 / 8
    print(o+e)

k = int(input())
print(k, k-1)

k = int(input())
print(k, k-1)

k = int(input())        
if (k%2) == 1:
    oe = ((k+3) * (k-1)) / 8
    print(2 * oe)
else:
    o = (k+4) * (k)/8
    e = (k+2) * (k-2) / 8
    print(o+e)

k = int(input())
print((k+1) * (K // 2) / 2)

k = int(input())        
if (k%2) == 1:
    oe = ((k+1) * (k-3)) / 8
    print(2 * oe)
else:
    o = (k+2) * (k-1)/8
    e = (k*(k-4))/8
    print(o+e)

k = int(input())        
if (k%2) == 1:
    oe = ((k+1) * (k-3)) / 8 
    print(2 * oe)
else:
    o = (k*2) * (k-1)/8
    e = (k*(k-4))/8
    print(o+e)


k = int(input())        

if (k%2) == 1:
    o = (k-1) * (k+1) / 8
    
    print(int(2*o))

else:
    o = k * (k+2) / 8
    e = k * (k-2) / 8
    print(int(o+e))

Verdicts: Runtime Error

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
a=abs(x1-x2)
b=abs(y1-y2)
if(y1<=y2):
  if(x1<=x2):
    print(x2-b,y2+a,x1-b,y1+a)
  else:
    print(x2-b,y2-a,x1-b,y1-a)
else:
  if(x1<=x2):
    print(x2+a,y2-b,x1+a,y1-b)
  else:
    print(x2+b,y2+a,x1+b,y1-a)

K=int(input())
print((K//2)*((K + 2 - 1) // 2))

Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k=int(input())
if n%2==0:
    print(int(n*n/4))
else:
    print(int((n-1)*(n+1)/4))

k=int(input())
if n%2==0:
    print(n*n/4)
else:
    print((n-1)*(n+1)/4)

n=int(input())
if n%2==0:
    print(int((n*n)/4))
else:
    print(int(((n-1)*(n+1))/4))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
if K%2 == 0:
  print((K/2)**2)
else:
  print((K-1)(K+1)/4)
  

K = int(input())
if K%2 == 0:
  print((K/2)**2)
else:
  print((K-1)*(K+1)/4)
  


K = int(input())
if K%2 == 0:
  print(int((K/2)**2))
else:
  print(int((K-1)(K+1)/4))
  


k = int(input())
if k%2==1:
  print((k//2)*(k//2+1))
else:
  print((k//2)**2)


Verdicts: Runtime Error

Wrong Answer

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
a=int(input()) 
if a % 2 == 0:
  print(a**2 / 4)
else:
  print(a * (a - 1) / 4)

k = int(input())
ans = 0
if k%2 == 1:
    n = (k+1)/2
    ans = n * (n-1)
else:
    ans = (k/2)*(k/2)
print(int(ans))


Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())
if K%2 = 0:
    A = (K/2)*(K/2)
else:
    A = ((K-1)/2)*((K+1)/2)

print(A)

K = int(input())
if K%2 == 0:
    A = (K/2)*(K/2)
else:
    A = ((K-1)/2)*((K+1)/2)

print(A)


K = int(input())
if K%2 == 0:
    A = (K/2)*(K/2)
else:
    A = ((K-1)/2)*((K+1)/2)

print(int(A))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())
print((k//2 + 1) * k//2)

k = int(input())
print((k//2+k%2) * (k//2))

Verdicts: Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n,k = map(int,input().split())

if k%2==1:
    ans = (n//k)**3
else:
    even = n//k
    odd  = (2*n)//k - even
    ans = even**3 + odd**3
print(ans)

list = [i for i in range(1, K + 1)]
odd = list[1::2]
even = list[0::2]

cnt = 0

for i in odd:
    for j in even:
        cnt += 1

print(cnt)

def factoring(K):
    list = [i for i in range(1, K + 1)]
    odd = list[1::2]
    even = list[0::2]

    cnt = 0

    for i in odd:
        for j in even:
            cnt += 1
    return print(cnt)

K = int(input())

list = [x for x in range(1,K+1)]

list_odd = list[1::2]
list_even = list[0::2]

cnt = 0

for i in list_odd:
    for j in list_even:
        cnt += 1

print(cnt)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
a = int(input())
if a%2  == 0 :
    print(a**2/4)
else :
    print((a+1)/2*(a-1)/2)
  

a = int(input())
if a%2  == 0 :
    print(a**2)
else :
    prin((a+1)/2*(a-1)/2)
  

a = int(input())
if a%2  == 0 :
    print(a**2)
else :
    print((a+1)/2*(a-1)/2)
  

a = int(input())
if a%2  == 0 :
    print(int(a**2/4))
else :
    print(int((a+1)/2*(a-1)/2))
  

Verdicts: Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
k = int(input())
a, b = a // 2 + a % 2, a // 2
print(a * b)



k = int(input())
a, b = k // 2 + k % 2, k // 2
print(a * b)

Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,input().split())
x3 = x2+y1-y2
y3 = -x1+x2+y2
x4 = x1+y1-y2
y4 = -x1+x2+y1
print(x3,y3,x4,y4)

K = int(input())
if K % 2 == 0:
  ans = (K // 2)**2
elif K % 2 == 1:
  a = K // 2
  b = a + 1
  ans = a * b
print(ans)

Verdicts: Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
K = int(input())

if K % 2 == 0:
  print(K/2*K/2)
else:
  print((K-1)*(K+1)/4)

x1, y1, x2, y2 = map(int, input().split())

y3 = y2 + x2- x1
y4 = x2 - x1 + y1
x3 = y1 - y2 + x2
x4 = y1 - y2 + x1

print(x3, y3, x4, y4)


K = int(input())
 
if K % 2 == 0:
  print(int(K/2*K/2))
else:
  print(int((K-1)*(K+1)/4))

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
N=int(input())
if N%2==1:
    print((N//2+1)*N//2)
else:
    print((N//2)**2)

N=int(input())
if N%2==1:
    print((N//2+1)*N//2)

N=int(input())
if N%2==1:
    print((N//2+1)*(N//2))
else:
    print((N//2)**2)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: Find the number of ways to choose a pair of an even number and an odd number from the positive integers between 1 and K (inclusive). The order does not matter.

Submission attempts (in order):
n=int(input())
if n%2==0:
  print((n//2)*(n//2-1)//2)
if n%2==1:
  print(((n-1)//2)*((n+1)//2)//2)

n=int(input())
if n%2==0:
  print((n//2)*(n//2))
if n%2==1:
  print(((n-1)//2)*((n+1)//2))

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
1, y1, x2, y2 = list(map(int, input().split()))

xx = x2 - x1
yy = y2 - y1

x3 = x2 - yy
y3 = y2 + xx
x4 = x3 - xx
y4 = y3 - yy

print(x3, y3, x4, y4)

x1, y1, x2, y2 = list(map(int, input().split()))

xx = x2 - x1
yy = y2 - y1

x3 = x2 - yy
y3 = y2 + xx
x4 = x3 - xx
y4 = y3 - yy

print(x3, y3, x4, y4)

Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
a=x2-x1
b=y2-y1
x3=x2+b
y3=y2-a
x4=x3-a
y4=y3-b
print("{} {} {} {}".format(x3,y3,x4,y4))

x1,y1,x2,y2=map(int,input().split())
a=x2-x1
b=y2-y1
x3=x2+b
y3=y2-a
x4=x3-a
y4=y3-b
print(x3,y3,x4,y4)

x1,y1,x2,y2=map(int,input().split())
a=x2-x1
b=y2-y1
x3=x2-b
y3=y2+a
x4=x1-b
y4=y1+a
print(x3,y3,x4,y4)

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
def dis( x1,y1,x2,y2):

	dist = (x1-x2)**2 + (y1-y2)**2
	return dist;

x1,y1,x2,y2 = map(int,input().split())
temp = dis(x1,y1,x2,y2);

if y1!=y2:

	slope = ( x1-x2 )/( y1 - y2 )

	L = x2;
	R = 99999999999999;
	flag=0;
	while ( R-L > 1):

		mid = ( L + R )//2;

		x3 = mid;
		y3 = slope*( x3 - x2 ) + y2;

		
		b = dis( x2,y2,x3,y3)

		if b==temp:
			flag=1;
			break;
		elif b > temp:
			R = mid-1;
		else:
			L = mid+1;
	
	if flag==0:
		mid = L;
		x3 = mid;
		y3 = slope*( x3 - x2 ) + y2;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			x3 = L;
		else:
			x3 = R;
	y3 = int(slope*( x3 - x2 ) + y2);

	x4 = x1+x3-x2;
	y4 = y1+y3-y2;

	print( x3,y3,x4,y4);
else:

	x3 = x2;

	L = y2;
	R = 9999999999999;

	while ( R-L > 1):

		mid = ( L + R )//2;

		y3 = mid;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			flag=1;
			break;
		elif b > temp:
			R = mid-1;
		else:
			L = mid+1;
	
	if flag==0:
		mid = L;
		y3 = mid;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			y3 = L;
		else:
			y3 = R;

	x4 = x1+x3-x2;
	y4 = y1+y3-y2;

	print( x3,y3,x4,y4);




def dis( x1,y1,x2,y2):

	dist = (x1-x2)**2 + (y1-y2)**2
	return dist;

x1,y1,x2,y2 = map(int,input().split())
temp = dis(x1,y1,x2,y2);

if y1!=y2:

	if y1>y2:
		dire = 1;
	else:
		dire=-1;

	num = ( x1-x2 )
	den = ( y2 - y1 )

	L = x2;
	R = 99999999999999;
	flag=0;
	while ( R-L > 1):

		mid = ( L + R )//2;

		x3 = mid;
		y3 = ( num*( x3 - x2 ) + y2*den )//den;

		
		b = dis( x2,y2,x3,y3)

		if b==temp:
			flag=1;
			break;
		elif b > temp:
			R = mid-1;
		else:
			L = mid+1;
	
	if flag==0:
		mid = L;
		x3 = mid;
		y3 = ( num*( x3 - x2 ) + y2*den )//den;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			x3 = L;
		else:
			x3 = R;
	#print(x3)
	#print(slope)
	y3 = ( num*( x3 - x2 ) + y2*den )//den;
	#print(y3)

	if dire == -1:

		x3 = x2 - ( x3-x2)
	y3 = ( num*( x3 - x2 ) + y2*den )//den;
	x4 = x1+x3-x2;
	y4 = y1+y3-y2;

	print( x3,y3,x4,y4);
else:

	x3 = x2;
	if x1>x2:
		dire=-1;
	else:
		dire=1;

	L = y2;
	R = 9999999999999;

	while ( R-L > 1):

		mid = ( L + R )//2;

		y3 = mid;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			flag=1;
			break;
		elif b > temp:
			R = mid-1;
		else:
			L = mid+1;
	
	if flag==0:
		mid = L;
		y3 = mid;

		b = dis( x2,y2,x3,y3)

		if b==temp:
			y3 = L;
		else:
			y3 = R;

	if dire == -1:
		y3 = y2 - (y3-y2);
			
	x4 = x1+x3-x2;
	y4 = y1+y3-y2;

	print( x3,y3,x4,y4);




Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
x4 = x3 - dx
y4 = y3 - dy

print(x3, y3, x4, y4

x1, y1, x2, y2 = map(int, input().split())
dx = x2 - x1
dy = y2 - y1

x3 = x2 - dy
y3 = y2 + dx
x4 = x1 - dy
y4 = y1 + dx

print(x3, y3, x4, y4)

Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())
dy = y2-y1
dx = x2-x1

print(x2+dy, y2+dx, x1-dy, y1-dx)

x1,y1,x2,y2=map(int,input().split())
dy = y2-y1
dx = x2-x1

print(x2-dy, y2+dx, x1-dy, y1+dx)


Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2=map(int,input().split())

k1=x2-x1
k2=y2-y1

print(x2-k2,y2+k1,x3-k1,y3-k2)

x1,y1,x2,y2=map(int,input().split())

k1=x2-x1
k2=y2-y1

print(x2-k2,y2+k1,x2-k2-k1,y2+k1-k2)

Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
sal
x1, y1, x2, y2 = map(int, input().split())
x3 = x2 + y1 - y2
y3 = y2 + x2 - x1
x4 = x3 + y2 - y3
y4 = y3 + x3 - x2
print(x3, y3, x4, y4)


x1,y1,x2,y2= map(int,input().split())
a=x2-x1
b=y2-y1

x3=x2-b
y3=y2+a

x4=x3-a
y4=y3-b

print(x3,y3,x4,y4)


Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x_1,y_1,x_2,y_2 = map(int, input().split())

print(x_2,y_2 + abs(x_2 - x_1), x_1, y_2 + abs(x_2 - x_1), end=' ')

a,b,c,d = map(int, input().split())
x = a - c
y = d - b
print(c - y, d - x, a - y, b - x)


Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,x2,y1,y2 = map(int,input().split())
print("{} {} {} {}".format(x1+abs(x1-x2),y1+abs(y1-y2),x2+abs(x1-x2),y2+abs(y1-y2)))

x1,y1,x2,y2 = map(int,input().split())
xnum = x2-x1
ynum = y2-y1
x3,y3 = x1-ynum,y1+xnum
x4,y4 = x2-ynum,y2+xnum
print(x4,y4,x3,y3)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1, y1, x2, y2 = list(map(int, input().split()))
vector = (x2-x1, y2-y1)
x3, y3 = x1-vector[1], y1+vector[0]
x4, y4 = x2-vector[1], y2+vector[0]
print(x3, y3, x4, y4)

x1, y1, x2, y2 = list(map(int, input().split()))
vector = (x2-x1, y2-y1)
x3, y3 = x2-vector[1], y2+vector[0]
x4, y4 = x1-vector[1], y1+vector[0]
print(x3, y3, x4, y4)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    print('{} {} {} {}'.format(np.round(a3[0,0]), np.round(a3[0,1]), np.round(a4[0,0]), np.round(a4[0,1])))


# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(np.round(a3[0,0]), np.round(a3[0,1]), np.round(a4[0,0]), np.round(a4[0,1])))


# cook your dish here
import numpy as np
if __name__ == '__main__':
    xy = [int(i) for i in input().split()]
    a1 = np.array([xy[0], xy[1]])
    a2 = np.array([xy[2], xy[3]])
    b = a2 - a1
    r = np.pi / 2
    rot = np.matrix((
        (np.cos(r), np.sin(r)),
        (-np.sin(r), np.cos(r))
    ))
    c = np.dot(b, rot)
    a3 = a2+c
    a4 = a1+c
    print('{} {} {} {}'.format(int(np.round(a3[0,0])), int(np.round(a3[0,1])), int(np.round(a4[0,0])), int(np.round(a4[0,1]))))


Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2=map(int, input().split())
vx=x2-x1
vy=y2-y1
tmp=vx
vx=-vy
vy=tmp
x3=x2+vx
y3=x2+vy
vx=x3-x2
vy=y3-y2
tmp=vx
vx=-vy
vy=tmp
x4=x3+vx
y4=y3+vy
print(str(x3)+' '+str(y3)+' '+str(x4)+' '+str(y4))

x1,y1,x2,y2=map(int,input().split())
a=x2-x1
b=y2-y1
print(x2-b,y2+a,x1-b,y1+a)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
l = map(int, input().split())
a=list(l)
x1=a[0]
y1=a[1]
x2=a[2]
y2=a[3]
x=x2-x1
y=y2-y1
x3=x2-y
y3=y2+x
x4=x1-y
y4=y1+x
c=[x3, y3, x4, y4]
print(c)

l = map(int, input().split())
a=list(l)
x1=a[0]
y1=a[1]
x2=a[2]
y2=a[3]
x=x2-x1
y=y2-y1
x3=x2-y
y3=y2+x
x4=x1-y
y4=y1+x
c=[x3, y3, x4, y4]
print(c[0], c[1], c[2], c[3])

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
Dist = abs(y1-y2)**2+abs(x1-x2)**2
dist = Dist**0.5
if x2 >= x1 and y2 >= y1:
  x3=x2-abs(y2-y1)
  x4=x1-abs(y2-y1)
  y3=y2+abs(x2-x1)
  y4=y1+abs(x2-x1)
elif x2 < x1 and y2 >= y1:
  x3=x2-abs(y2-y1)
  x4=x1-abs(y2-y1)
  y3=y2-abs(x2-x1)
  y4=y1-abs(x2-x1)
elif x2 < x1 and y1 >= y2:
  x3=x2+abs(y2-y1)
  x4=x1+abs(y2-y1)
  y3=y2-abs(x2-x1)
  y4=y1-abs(x2-x1)
else:
  x3=x2+abs(y2-y1)
  x4=x1+abs(y2-y1)
  y3=y2+abs(x2-x1)
  y4=y1+abs(x2-x1)
print(x3,y3,x4,y4)

x1,y1,x2,y2=map(int,input().split())
Dist = abs(y1-y2)**2+abs(x1-x2)**2
dist = Dist**0.5
for i in range(-1000,1000):
  if y2 ==y1:
    x3 = x2
    x4 = x1
    y3 = int(dist)
    y4 =y3
  elif x1 == x2:
    x3 = -dist
    x4 = x3
    y3 = y2
    y4 = y1
  else:
    if Dist*(i-x2)**2==Dist*(y2-y1)**2:
      if i < x2:
        x3 = i
        y3 = y2 - (x2-x1)*(x3-x2)//(y2-y1)
    if Dist*(i-x1)**2==Dist*(y2-y1)**2:
      if i < x1:
        x4 = i
        y4 = y1 - (x2-x1)*(x4-x1)//(y2-y1)
print(x3,y3,x4,y4)

x1,y1,x2,y2=map(int,input().split())
if x2 >= x1 and y2 >= y1:
  x3=x2-abs(y2-y1)
  x4=x1-abs(y2-y1)
  y3=y2+abs(x2-x1)
  y4=y1+abs(x2-x1)
elif x2 < x1 and y2 >= y1:
  x3=x2-abs(y2-y1)
  x4=x1-abs(y2-y1)
  y3=y2-abs(x2-x1)
  y4=y1-abs(x2-x1)
elif x2 < x1 and y1 >= y2:
  x3=x2+abs(y2-y1)
  x4=x1+abs(y2-y1)
  y3=y2-abs(x2-x1)
  y4=y1-abs(x2-x1)
else:
  x3=x2+abs(y2-y1)
  x4=x1+abs(y2-y1)
  y3=y2+abs(x2-x1)
  y4=y1+abs(x2-x1)
print(x3,y3,x4,y4)

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
int_k = int(input())

if int_k % 2 == 0:
    print((int_k // 2) ** 2)
else:
    print((int_k // 2) * ((int_k //2) + 1))


int_x1, int_y1, int_x2, int_y2 = map(int, input().split())

int_x3 = int_y3 = int_x4 = int_y4 = 0

int_x = int_x2 - int_x1
int_y = int_y2 - int_y1

print(int_x2 - int_y, int_y2 + int_x, int_x1 - int_y, int_y1 + int_x)



Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())

tmpx = x2 - x1
tmpy = y2 - y1
print(tmpx, tmpy)
if tmpx > 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2 + tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy

elif tmpx == 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2
    x4 = x3
    y4 = y3 + (x3-x2)
elif tmpx == 0 and tmpy < 0:
    x3 = x2 - tmpy
    y3 = y2
    x4 = x3
    y4 = y3 + (x3-x2)
elif tmpx > 0 and tmpy == 0:
    x3 = x2
    y3 = y2 + tmpx
    x4 = x3 - (y3-y2)
    y4 = y3
elif tmpx < 0 and tmpy == 0:
    x3 = x2
    y3 = y2 + tmpx
    x4 = x3 - (y3-y2)
    y4 = y3

elif tmpx < 0 and tmpy > 0:
    x3 = x2 - tmpy
    y3 = y2 + tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy
elif tmpx < 0 and tmpy < 0:
    x3 = x2 + tmpy
    y3 = y2 - tmpx
    x4 = x3 - tmpx
    y4 = y3 - tmpy
elif tmpx > 0 and tmpy < 0:
    x3 = x2 + tmpy
    y3 = y2 - tmpy
    x4 = x3 - tmpx
    y4 = y3 - tmpy

print(x3, y3, x4, y4)


# tmp = 0

# print(tmp)
# cnt = 0
#
# for k in tmp:
#     if
# for j in tmp:
#     if j %2 == 0:
#         cnt += 1
# print(len(tmp)*3-cnt)

x1, y1, x2, y2 = map(int, input().split())

tmpx = x2 - x1
tmpy = y2 - y1

print(x2-tmpy, y2+tmpx, x1-tmpy, y1+tmpx)


Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,input().split())
diffy = x2-x1
diffx = y2-y1
print(diffy,diffx)
print(x2-diffx,y2+diffy,x1-diffx,y1+diffy)

x1,y1,x2,y2 = map(int,input().split())
diffy = x2-x1
diffx = y2-y1
#print(diffy,diffx)
print(x2-diffx,y2+diffy,x1-diffx,y1+diffy)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1,y1,x2,y2 = map(int,int(input().split())
h = max(abs(x2-x1),abs(y2-y1))
v = min(abs(x2-x1),abs(y2-y1))
if x1 > x2:
  if y1 > y2: print(x2+h,y2-v,x1+h,y1-v)
  else:print(x2-v,y2-h,x1-v,y1-h)
else:
  if y1 > y2: print(x2+v,y2+h,x1+v,y1+h)
  else:print(x2-h,y2+v,x1-h,y1+v)

x1,y1,x2,y2 = map(int,input().split())
h = abs(x2-x1)
v = abs(y2-y1)
if x1 > x2:
  if y1 > y2: print(x2+v,y2-h,x1+v,y1-h)
  else:         print(x2-v,y2-h,x1-v,y1-h)
else:
  if y2 > y1: print(x2-v,y2+h,x1-v,y1+h)
  else:         print(x2+v,y2+h,x1+v,y1+h)

Verdicts: Runtime Error

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
# input
x1, y1, x2, y2 = map(int, input().split())

x3 = y2 - y1 + x2
y3 = x1 - x2 + y2
x4 = y2 - y1 + x1
y4 = x1 - x2 + y1
print(x3, y3, x4, y4)

# input
x1, y1, x2, y2 = map(int, input().split())

x3 = y1 - y2 + x2
y3 = x2 - x1 + y2
x4 = y1 - y2 + x1
y4 = x2 - x1 + y1
print(x3, y3, x4, y4)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
x1, y1, x2, y2 = map(int, input().split())

def vector(x1, y1, x2, y2):
    return [x2 - (y2 - y1), y2 + (x2 - x1)]

ans = vector(x1, y1, x2, y2)
ans += vector(x2, y2, ans[0], ans[1])

print(ans)


x1, y1, x2, y2 = map(int, input().split())

def vector(x1, y1, x2, y2):
    return x2 - (y2 - y1), y2 + (x2 - x1)

x3, y3 = vector(x1, y1, x2, y2)
x4, y4 = vector(x2, y2, x3, y3)

print(x3, y3, x4, y4)

Verdicts: Wrong Answer

Accepted
Problem: There is a square in the xy-plane. The coordinates of its four vertices are (x_1,y_1),(x_2,y_2),(x_3,y_3) and (x_4,y_4) in counter-clockwise order. (Assume that the positive x-axis points right, and the positive y-axis points up.)  Takahashi remembers (x_1,y_1) and (x_2,y_2), but he has forgot (x_3,y_3) and (x_4,y_4).  Given x_1,x_2,y_1,y_2, restore x_3,y_3,x_4,y_4. It can be shown that x_3,y_3,x_4 and y_4 uniquely exist and have integer values.

Submission attempts (in order):
import numpy as np

x_1, y_1, x_2, y_2 = map(int, input().split())

P_1 = np.array([x_1, y_1])
P_2 = np.array([x_2, y_2])
vec_12 = P_2 - P_1
vec_13 = np.array([-vec_12[1], vec_12[0]])
P_3 = P_1 + vec_13
P_4 = P_2 + vec_13
print(P_3[0], P_3[1], P_4[1], P_4[2])


import numpy as np

x_1, y_1, x_2, y_2 = map(int, input().split())

P_1 = np.array([x_1, y_1])
P_2 = np.array([x_2, y_2])
vec_12 = P_2 - P_1
vec_13 = np.array([-vec_12[1], vec_12[0]])
P_3 = P_1 + vec_13
P_4 = P_2 + vec_13
print(P_3[0], P_3[1], P_4[0], P_4[1])


import numpy as np

x_1, y_1, x_2, y_2 = map(int, input().split())

P_1 = np.array([x_1, y_1])
P_2 = np.array([x_2, y_2])
vec_12 = P_2 - P_1
vec_13 = np.array([-vec_12[1], vec_12[0]])
P_3 = P_1 + vec_13
P_4 = P_2 + vec_13
print(P_4[0], P_4[1], P_3[0], P_3[1])


Verdicts: Runtime Error

Wrong Answer

Accepted