Problem:


Score : 100 points

Problem Statement

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.

Constraints

2\leq K\leq 100

K is an integer.

Input

Input is given from Standard Input in the following format:

K

Output

Print 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).

Sample Input 1

3

Sample Output 1

2

Two pairs can be chosen: (2,1) and (2,3).

Sample Input 2

6

Sample Output 2

9

Sample Input 3

11

Sample Output 3

30

Sample Input 4

50

Sample Output 4

625



Sample input:
3


Sample output:
2

Submission status: Runtime Error

Solution code:
a=int(input());x=n//2;print((n-x)*x)

Submission status: Runtime Error

Solution code:
N, K = (int(i) for i in input().split())
D = 0
for i in range(1, N + 1):
    for j in range(1, N + 1):
        A = i + j
        if A % K == 0:
          for k in range(1, N + 1):
            B = j + k
            C = i + k
            if B % K == 0 and C % K == 0:
              D += 1
print(D)

Submission status: Runtime Error

Solution code:
x1, y1, x2, y2 = map(int, input().split(' '))

xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

if x1<=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 + xdif
     x4 = x1 - ydif
     y4 = y1 + xdif
elif x1<=x2 and y1>=y2:
     x3 = x2 + ydif
     y3 = y2 + xdif
     x4 = x1 + xdif
     y4 = y1 + ydif
elif x1>=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 - xdif
     x4 = x1 - ydif
     y4 = y1 - xdif
else:
     x3 = x2 + ydif
     y3 = y2 - xdif
     x4 = x1 + ydif
     y4 = y1 - xdif
     
print(x3, y3, x4, y4)

Submission status: Runtime Error

Solution code:
x1, y1, x2, y2 = map(int, input().split(' '))


xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

if x1<=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 + xdif
     x4 = x1 - ydif
     y4 = y1 + xdif
elif x1<=x2 and y1>=y2:
     x3 = x2 + ydif
     y3 = y2 + xdif
     x4 = x1 + xdif
     y4 = y1 + ydif
elif x1>=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 - xdif
     x4 = x1 - ydif
     y4 = y1 - xdif
else:
     x3 = x2 + ydif
     y3 = y2 - xdif
     x4 = x1 + ydif
     y4 = y1 - xdif
     
print(x3, y3, x4, y4)

Submission status: Runtime Error

Solution code:
x1, y1, x2, y2 = map(int, input().split(' '))


xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

if x1<=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 + xdif
     x4 = x3 - xdif
     y4 = y3 - xdif
elif x1<=x2 and y1>=y2:
     x3 = x2 + ydif
     y3 = y2 + xdif
     x4 = x1 + xdif
     y4 = y1 + ydif
elif x1>=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 - xdif
     x4 = x1 - ydif
     y4 = y1 - xdif
else:
     x3 = x2 + ydif
     y3 = y2 - xdif
     x4 = x1 + ydif
     y4 = y1 - xdif
     
print(x3, y3, x4, y4)

Submission status: Runtime Error

Solution code:
x1, y1, x2, y2 = map(int, input().split(' '))


xdif = abs(x1 - x2)
ydif = abs(y1 - y2)

if x1<=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 + xdif
     x4 = x3 + xdif
     y4 = y3 - ydif
elif x1<=x2 and y1>=y2:
     x3 = x2 + ydif
     y3 = y2 + xdif
     x4 = x1 + xdif
     y4 = y1 + ydif
elif x1>=x2 and y1<=y2:
     x3 = x2 - ydif
     y3 = y2 - xdif
     x4 = x1 - ydif
     y4 = y1 - xdif
else:
     x3 = x2 + ydif
     y3 = y2 - xdif
     x4 = x1 + ydif
     y4 = y1 - xdif
     
print(x3, y3, x4, y4)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
a=list(l)
print(a[2]-(a[3]-a[1]), a[3]+a[2]-a[0], a[1]-(a[3]-a[1]), a[1]+a[2]-a[0])

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
N, K = (int(i) for i in input().split())
D = 0
for i in range(1, [N + 1]):
    for j in range(1,[N + 1]):
        A = i + j
        if A % K == 0:
            for j in range(1, [N + 1]):
                for k in range(1, [N + 1]):
                    B = j + k
                    C = i + k
                    if B % K == 0 and C % K == 0:
                        D += 1
print(D)

Submission status: Runtime Error

Solution code:
l = map(int, input().split())
a=list(l)
x=a[2]-a[0]
y=a[3]-a[1]
x3=a[2]-y
y3=a[3]+x
x4=a[1]-y
y4=a[1]+x
print(x3, y3, x4, y4)

Submission status: Runtime Error

Solution code:
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])

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
N, K  = (int(i) for i in input().split())
D = 0
for i in range(N + 1):
    for j in range(N + 1):
         A = i + j
         if A % K == 0:
              for j in range(N + 1):
                  for k in range(N + 1):
                      B = j + k
                      C = i + k
                      if B % K = 0 and C % K = 0:
                          D += 1
print(D)

Submission status: Runtime Error

Solution code:
def get(n):
z=((n//2)*2)-(n-1)//2
if(n%2==0):
return (n//2)*2
elif(n==1):
return 0
else:
return z

Submission status: Runtime Error

Solution code:
import math
K = input()
all_number =  K * K
even_number =  math.floor(K/2) * math.floor(K/2)
odd_number = math.ceil(K/2) * math.ceil(K/2)
answer = (all_number - even_number - odd_number)/2
print(answer)

Submission status: Runtime Error

Solution code:
A, B, C, D = (int(i) for i in input().split())
if D > B and A > C:
    E = (C - (D - B))
    F = D - (A - C)
    G = (A - (D - B))
    H = B - (A - C)
    print(E, F, G, H)
elif A > C and B > D:
    E = C + (B - D)
    F = D - (A - C)
    G = A + (B - D)
    H = B - (A - C)
    print(E, F, G, H)
elif B > D and C > A:
    E = (C + (B - D))
    F = D + (C - A)
    G = (A + (B - D))
    H = B + (C - A)
    print(E, F, G, H)
else:
    E = C - (D - B)
    F = D + (C - A)
    G = A - (D - B)
    H = B + (C - A)
    print(E, F, G, H)

Submission status: Runtime Error

Solution code:
import math

all_number =  K * K
even_number =  math.floor(K/2) * math.floor(K/2)
odd_number = math.ceil(K/2) * math.ceil(K/2)
answer = (all_number - even_number - odd_number)/2
print(answer)

Submission status: Runtime Error

Solution code:
N, K = map(int, input().split())
ans = 0
for i in range(1,N + 1):
  for j in range(1,N + 1):
    for k in range(1,N + 1):
      if ((i + j) % K == 0) and ((j + k) % K == 0) and ((k + i) % K == 0):
        ans += 1
print(ans)

Submission status: Runtime Error

Solution code:
import math

all_number =  K * K
even_number =  math.floor(all_number/2)*math.floor(all_number/2)
odd_number = math.ceil(all_number/2)*math.ceil(all_number/2)
answer = (all_number - even_number - odd_number)/2

Submission status: Runtime Error

Solution code:
asdf = input()
if asdf % 2 == 0:
  k1 = asdf / 2
  Ans = k1 * k1
else:
  k2 = (asdf + 1) / 2
  k3 = k2 - 1
  Ans = K2 * k3
print(Ans)

Submission status: Runtime Error

Solution code:
asdf = int(input('なんで'))
if asdf % 2 == 0:
  k1 = asdf / 2
  Ans = k1 * k1
else:
  k2 = (asdf + 1) / 2
  k3 = k2 - 1
  Ans = K2 * k3
print(Ans)

Submission status: Runtime Error

Solution code:
asdf = int(input( ))

if asdf % 2 == 0:
  k1 = asdf / 2
  Ans = k1 * k1
else:
  k2 = (asdf + 1) / 2
  k3 = k2 - 1
  Ans = K1 * k2
print(Ans)

Submission status: Runtime Error

Solution code:
AAAA = int(input( ))

if AAAA % 2 == 0:
  k1 = AAAA / 2
  Ans = k1 * k1
else:
  k2 = (AAAA + 1) / 2
  k3 = k2 - 1
  Ans = K1 * k2
print(Ans)

Submission status: Runtime Error

Solution code:
k = int(input())
ans = k%2 == 0 ? (k/2)**2 : (k+1)/2 * ((k+1)/2 - 1)
print(ans)

Submission status: Runtime Error

Solution code:
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)

Submission status: Runtime Error

Solution code:
k = int(input())
ans = k%2 == 0 ? (k/2)**2 : (k//2)*(k//2 -1)
print(ans)

Submission status: Runtime Error

Solution code:
import sys, math
from sys import stdin, stdout
rem = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 6+5)
#from resource import *; setrlimit(RLIMIT_STACK, (RLIM_INFINITY, RLIM_INFINITY))
take = lambda: map(int, stdin.readline().strip().split())
from bisect import bisect_left,bisect_right

x1,y1,x2,y2=take()

if x1==x2:
    diff=y1-y2
    print x2+diff,y2,x1+diff,y1
else:
    diff=x1-x2
    print x2,y2-diff,x1,y1-diff

Submission status: Runtime Error

Solution code:
K = int(input())

if K%2 ==0:
  kx = k/2
  Ans = kx *kx
else:
  k1 = (K+1)/2
  k2 = k1-1
  Ans = K1*k2
print(Ans)

Submission status: Runtime Error

Solution code:
K = int(input)

if K%2 ==0:
  kx = k/2
  Ans = kx *kx
else:
  k1 = (K+1)/2
  k2 = k1-1
  Ans = K1*k2
print(Ans)

Submission status: Runtime Error

Solution code:
k=int(input())
print((k/2)**2 if k%2==0 else ((k/2)-0.5)((k/2)+0.5))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import sys, math
from sys import stdin, stdout
rem = 10 ** 9 + 7
sys.setrecursionlimit(10 ** 6+5)
from resource import *; setrlimit(RLIMIT_STACK, (RLIM_INFINITY, RLIM_INFINITY))
take = lambda: map(int, stdin.readline().strip().split())
from bisect import bisect_left,bisect_right

k=input()
print (k/2*(k-k/2))

Submission status: Runtime Error

Solution code:
s = input()

if s%2 == 0:
  a = s/2
  b = s/2
else:
  a = s/2
  b = s/2+1

print(a*b)

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
import math
instr = intput()
K = int(instr)

COdd = math.ceil(K / 2)
CEven = int(K / 2)

ans = COdd * CEven
print(ans)

Submission status: Runtime Error

Solution code:
K = (int(i) for i in input().split())
if K % 2 == 0:
    A = (K / 2) * (K / 2)
    print(A)
else:
    B = ((K / 2) + 1) * (K / 2)
    print(B)

Submission status: Runtime Error

Solution code:
import math

s = input()

print(math.ceil(s/2)*math.floor(s/2))

Submission status: Runtime Error

Solution code:
import math
s = input()
return math.floor(s/2)*math.ceil(s/2)

Submission status: Runtime Error

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

print(A)

Submission status: Runtime Error

Solution code:
K = input()

num_odd = K // 2 if K % 2 == 0 else K // 2 + 1
num_even = K // 2

print(num_odd * num_even)

Submission status: Runtime Error

Solution code:
N = int(input())

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