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: Accepted

Solution code:
# abc108_a.py
# https://atcoder.jp/contests/abc108/tasks/abc108_a

# A - Pair /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 1以上 K以下の正の整数から、偶数と奇数ひとつずつの組を選ぶ方法の個数を求めてください。なお、選ぶ順番は考慮しません。

# 制約
#     2≤K≤100
#     Kは整数である

# 入力
# 入力は以下の形式で標準入力から与えられる。
# K

# 出力
# 1以上 K以下の正の整数から、偶数と奇数ひとつずつの組を選ぶ方法の個数を出力せよ。

# 入力例 1
# 3

# 出力例 1
# 2

# (2,1)と (2,3)が条件を満たします。

# 入力例 2
# 6

# 出力例 2
# 9

# 入力例 3
# 11

# 出力例 3
# 30

# 入力例 4
# 50

# 出力例 4
# 625


def calculation(lines):
    # N, K = list(map(int, lines[0].split()))
    N = int(lines[0])
    if N%2 == 0:
        ans = (N/2)**2
    else:
        ans = ((N+1)/2 * (N-1)/2)
    return [int(ans)]


# 引数を取得
def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines


# テストデータ
def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['3']
        lines_export = [2]
    if pattern == 2:
        lines_input = ['6']
        lines_export = [9]
    if pattern == 3:
        lines_input = ['11']
        lines_export = [30]
    if pattern == 4:
        lines_input = ['50']
        lines_export = [625]
    return lines_input, lines_export


# 動作モード判別
def get_mode():
    import sys
    args = sys.argv
    if len(args) == 1:
        mode = 0
    else:
        mode = int(args[1])
    return mode


# 主処理
def main():
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    # if mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
K = int(input())

print((K//2)*(K-K//2))

Submission status: Accepted

Solution code:
import math
k = int(input())
print(math.floor(k/2)*math.ceil(k/2))

Submission status: Accepted

Solution code:
# 初期入力
import sys
#input = sys.stdin.readline  #文字列では使わない

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

e = k // 2

print(e * (k - e))

Submission status: Accepted

Solution code:
import bisect, collections, copy, heapq, itertools, math, string, sys
input = lambda: sys.stdin.readline().rstrip() 
sys.setrecursionlimit(10**7)
INF = float('inf')
def I(): return int(input())
def F(): return float(input())
def SS(): return input()
def LI(): return [int(x) for x in input().split()]
def LI_(): return [int(x)-1 for x in input().split()]
def LF(): return [float(x) for x in input().split()]
def LSS(): return input().split()

def resolve():
    K = I()

    ans = (K // 2) * (K - K // 2)
    print(ans)

if __name__ == '__main__':
    resolve()

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

Solution code:
K = int(input())

even_num = K//2
odd_num = K - K//2

print(even_num*odd_num)

Submission status: Accepted

Solution code:
def even(num):
	return num//2

def odd(num):
	return num//2+num%2


K=int(input())

print(even(K)*odd(K))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

k = int(readline())
print((k // 2) ** 2 if k % 2 == 0 else ((k // 2)*(k // 2+1)))

Submission status: Accepted

Solution code:
K = int(input())

print(K//2*(K - K//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
print(K**2//4)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
even = k//2
odd = k//2 + k%2
print(even * odd)

Submission status: Accepted

Solution code:
import itertools
k = int(input())
p = []
for i in range(1, k+1):
    p.append(i)
ans = 0
for v in itertools.combinations(p, 2):
    if v[0] % 2 == 0 and v[1] % 2 == 1 or v[1] % 2 == 0 and v[0] % 2 == 1:
        ans += 1
print(ans)

Submission status: Accepted

Solution code:
s = int(input())
if s % 2 == 1:
  Odd = (s+1)/2
  Even = Odd -1
else:
  Odd = s/2
  Even = Odd
res= int(Odd) * int(Even)
print(res)

Submission status: Accepted

Solution code:
k=int(input())
print(k//2*(k-k//2))

Submission status: Accepted

Solution code:
k = int(input())

l = [0]
for i in range(1, k + 1):
    l.append(l[-1] + i // 2)
# l = [0, 0, 1, 2, 4, 6, 9, 12, ... k]

print(l[-1])

Submission status: Accepted

Solution code:
K = int(input())
 
ev = K//2
odd = K//2 + K%2
print(ev*odd)

Submission status: Accepted

Solution code:
def main():
    k=int(input())
    k1 = len([i for i in range(k) if i % 2 == 0])
    print(k1*(k-k1))
    
if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
def main():
 a = int(input())
 if a % 2 == 0:
     print(a // 2 * a // 2)
 else:
     print((a // 2 + 1) * ( a // 2))
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, os, math, bisect, itertools, collections, heapq, queue
# from scipy.sparse.csgraph import csgraph_from_dense, floyd_warshall
from decimal import Decimal
from collections import defaultdict, deque

sys.setrecursionlimit(10000000)

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

lcm = lambda x, y: (x * y) // math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    K = ii()
    e = K // 2
    o = (K + 1) // 2
    print(e * o)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    return (K//2) * (K - (K//2))
print(main())

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
if k %2 == 0:
  print(int(k*k/2/2))
elif k%2 ==1:
  print(int((k//2 + 1)*(k//2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

e = k // 2
o = 0

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

Submission status: Accepted

Solution code:
a = int(raw_input())
odds = (a + 1)/2
even = a/2

print even * odds

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

E = N//2
O = N//2 + N%2

print(E*O)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
if k % 2 == 0:
    odd = k // 2
    even = k // 2
else:
    odd = k // 2
    even = k // 2 + 1

print(odd * even)

Submission status: Accepted

Solution code:
import sys
K = int(input())
if not (2 <= K <= 100):
    sys.exit()

array_all = [ all for all in range(K) ]
array_even = array_all[0::2]
array_odd = array_all[1::2]

count = 0
for I in array_even:
    for J in array_odd:
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
def gcd(*numbers): reduce(math.gcd, numbers)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
count = 0
ans = 0
inf = float("inf")

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
ri = lambda: int(sys.stdin.readline())

n = ri()
a = n//2
print(a * (n-a))

Submission status: Accepted

Solution code:
import itertools 
k=int(input());ans=0
l=list(itertools.combinations([i for i in range(1,k+1)], 2));
for i in l:
  if (i[0]%2!=0 and i[1]%2==0) or (i[0]%2==0 and i[1]%2!=0):ans+=1
print(ans)

Submission status: Accepted

Solution code:
K = int(input())
ans = (K//2) * (K-K//2)
print(ans)

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
k2 = k // 2
k3 = k - k2
print(k2 * k3)

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

        

if '__main__' == __name__:
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

def even(num):
	return num//2

def odd(num):
	return num//2+num%2
K=int(input())

print(even(K)*odd(K))

Submission status: Accepted

Solution code:
K=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())        
print((N//2)*((N-N//2)))

Submission status: Accepted

Solution code:
K = int(input())    
count = 0
i = 0
j = 0

if K == 2:
    count = 1

elif K == 3:
    count = 2

elif K > 3:
    while i < K:
        i += 1
        j = i + 1

        while j <= K:
            
            count += 1
            
            j += 2
            
print(count)

Submission status: Accepted

Solution code:
K = int(input())

odd = 0
eve = 0
for i in range(1,K+1):
    if i % 2 == 0:
        eve += 1
    else:
        odd += 1

print(eve * odd)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
odd = k//2 + k % 2
even = k//2
print(odd*even)

Submission status: Accepted

Solution code:
import math
k=int(input())
print(k//2*math.ceil(k/2))

Submission status: Accepted

Solution code:
K = int(input())
print(K//2 * (K - K//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
print(int(int(input())**2//2/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

k = int(input())

print((k // 2) * ((k // 2) + (k % 2)))

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    K = int(input())
    odd = 0
    even = 0

    for i in range(K):
        if (i + 1) % 2 == 0:
            even += 1
        else:
            odd += 1
    
    print(even * odd)
main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
res = 0
for i in range(1,K+1):
  if i % 2 == 0:
    for j in range(i+1,K+1):
      if j%2 !=0:
        res+=1
  else:
    for j in range(i+1,K+1):
      if j%2 ==0:
        res+=1
        
print(res)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    from builtins import int, map, list, print
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = (lambda: (sys.stdin.readline()).rstrip())
    input_list = (lambda: input().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

    K = input_number()
    print(-(-K // 2) * (K // 2))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

if k % 2 == 1:
    o = n + 1
    print(o*n)

Submission status: Accepted

Solution code:
K = int(input())

gu = 0
for i in range(1,K+1):
    if i % 2 ==0:
        gu+=1

ki = 0
for j in range(1,K+1):
    if j % 2 ==1:
        ki+=1

print(gu*ki)

Submission status: Accepted

Solution code:
K = int(input())
print(K//2*(K-K//2))

Submission status: Accepted

Solution code:
K = int(input())
print((K//2)*(K-K//2))

Submission status: Accepted

Solution code:
k = int(input())
e = k//2
if k%2==0:
  o=e
else:
  o=e+1
print(e*o)

Submission status: Accepted

Solution code:
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

K = i()
print(K//2*(K-K//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a=int(input())
b=a//2
c=a%2
print(b*(b+c))

Submission status: Accepted

Solution code:
k = int(input())
print(-(-k//2)*(k//2))

Submission status: Accepted

Solution code:
def ip():return int(input())

k=ip()
print((k+1)//2*(k//2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

od = []
ev = []

for i in range(1,k+1):
    if i % 2 == 0:
        ev.append(i)
    else:
        od.append(i)

print(len(od)*len(ev))

Submission status: Accepted

Solution code:
K=int(input())
print((K-(K//2))*(K//2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def i():
	return int(input())
def i2():
	return map(int,input().split())
def s():
	return str(input())
def l():
	return list(input())
def intl():
	return list(int(k) for k in input().split())

k = i()
ans = 0
ls = list(int(k) for k in range(1,k+1))
for i in range(k):
	ans += ls[i]//2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())
print(str(int(K/2)*(K-int(K/2))))

Submission status: Accepted

Solution code:
k=int(input());print(k//2*(k//2+k%2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
print((N >> 1) * ((N >> 1) + (N & 1)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
count = 0

for i in range(k):
    if i % 2 == 0:
        for j in range(k):
            if j % 2 != 0:
                count += 1
print(count)

Submission status: Accepted

Solution code:
import math
k=int(input())
print(math.ceil(k/2)*(k//2))

Submission status: Accepted

Solution code:
import sys
input=sys.stdin.readline
k=int(input())
e=k//2
if k%2==0:
    o=e
else:
    o=e+1
print(o*e)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

r = k % 2
x = k // 2
y = (k + 1) // 2
z = (k - 1) // 2

if r == 0:
  print(x ** 2)
else:
  print(y * z)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

Solution code:
k = int(input())
n = k//2
a = n*(n+1)//2
x = (k-1)%2
print(a*2 - x*n)

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

Solution code:
k = int(input())

p = k // 2

if k % 2 == 0:
    print(p * p)
elif k % 2 > 0:
    print(p*(p+1))

Submission status: Accepted

Solution code:
def actual(k):
    n_even = k // 2
    n_odd = (k + 1) // 2

    return n_even * n_odd

k = int(input())
print(actual(k))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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

print(int(num))

Submission status: Accepted

Solution code:
k = int(input())

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

print(int(num))

Submission status: Accepted

Solution code:
k=int(input());print(k//2*(k-k//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
e = n//2
o = n-e
print(e*o)

Submission status: Accepted

Solution code:
K = int(input())

count = 0
for i in range(1, K+1):
    for j in range(i+1, K+1, 2):
        count += 1
print(count)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K=int(input())

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

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

Solution code:
# A - Pair

K = int(input())

even = K//2
odd = (K+1)//2

print(even*odd)

Submission status: Accepted

Solution code:
k=int(input())
ans=0
for i in range(1,k+1):
    for j in range(1,k+1):
        if i%2==0 and j%2==1:
            ans+=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
k = int(input())
#奇数
a = (k + 1) // 2
#偶数
b = k // 2

#//で割ると整数になる
print(a * b)

Submission status: Accepted

Solution code:
import sys
def input(): return sys.stdin.readline().strip()


def main():
    k = int(input())
    if k % 2 == 0: print((k // 2) ** 2)
    if k % 2 != 0: print(((k - 1) // 2) * (k + 1) // 2)
    

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
import math
k = int(input())
print(math.ceil(k/2) * math.floor(k/2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
print((n//2)*(n//2+(n%2)))

Submission status: Accepted

Solution code:
k=int(input())
print((k//2)*(k-k//2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
s = n//2
k = n-s
print(s*k)

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())
a = int(N/2)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
Q = 0
A = 0
for i in range(1,K+1):
  if i % 2 == 0:
    Q += 1
  else:
    A += 1
print(Q*A)

Submission status: Accepted

Solution code:
K = int(input())
even = K//2
odd = K//2 + 1*(K%2==1)
print(even*odd)

Submission status: Accepted

Solution code:

k=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
print(k // 2 * -(-k // 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    k = int(input())

    if k % 2:
        res = (k // 2) * (k - k // 2)
    else:
        res = (k // 2) ** 2

    print(res)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from itertools import combinations

# input
K = int(input())

# check
cnt = len(
    [
        1
        for c in list(combinations(list(range(1, K + 1)), 2))
        if (c[0] + c[1]) % 2 == 1
    ]
)

print(cnt)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
ans = 0
for i in range(1,k+1):
    for j in range(1,k+1):
        if i % 2 == 0 and j % 2 == 1:
            ans +=1
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
n = k//2
if k%2: #odd
    ans = n*(n+1)
else: # even
    ans = n*n

print(ans)

Submission status: Accepted

Solution code:
k = int(input())

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

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

print(ans)

Submission status: Accepted

Solution code:
k = int(input())
even = k // 2
odd = k // 2 + k % 2
print(even * odd)

Submission status: Accepted

Solution code:
k = int(input())
a = k // 2
b = a if k % 2 == 0 else a + 1
ans = a * b
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k=int(input())
print((k//2)*(math.ceil(k/2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

print(n // 2 * (n - n // 2))

Submission status: Accepted

Solution code:
K = int(input())
cnt = 0

for i1 in range(1,K+1):
  for i2 in range(i1+1, K+1):
    if i1%2 != 0 and i2%2 == 0:
      cnt = cnt+1
    elif i1%2 ==0 and i2%2 != 0:
      cnt = cnt+1
      
print(cnt)

Submission status: Accepted

Solution code:
n = int(input())

print(n // 2 * (n - n // 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())
k = K // 2
g = K - k
print(k*g)

Submission status: Accepted

Solution code:
import itertools

N = int(input())
odd = N // 2 + N % 2
even = N // 2

print(odd * even)

Submission status: Accepted

Solution code:
# coding: utf-8

# https://atcoder.jp/contests/abc108
# 14:20-


def main():
    k = int(input())

    return ((k + (k % 2)) // 2) * (k // 2)


print(main())

Submission status: Accepted

Solution code:
k = int(input())

e = k // 2
o = k - e
ans = e * o
print(ans)

Submission status: Accepted

Solution code:
K=int(input())
g=K//2
k=K-g
print(g*k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

Solution code:
K = int(input())

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

print(ans)

Submission status: Accepted

Solution code:
k = int(input())
a = k // 2
if k % 2 != 0:
  print((a+1) * a) 
else:
  print(a ** 2)

Submission status: Accepted

Solution code:
k = int(input())
count_odd = 0
count_even = 0
for i in range(1, k+1):
    if i % 2 == 0:
        count_even += 1
    else:
        count_odd += 1
print(count_odd*count_even)

Submission status: Accepted

Solution code:
k = int(input())
count = 0
for i in range(1, k):
    for j in range(i+1, k+1):
        if i % 2 == 1 and j % 2 == 0:
            count += 1
        elif i % 2 == 0 and j % 2 == 1:
            count += 1
print(count)