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:
def main():
  k = int(input())
  #s = input()
  #s = input().split()
  #a,b = list(map(int,input().split()))
  #a = [input() for i in range(n)]
  #a = [int(input()) for i in range(n)]
  #a = [input().split() for i in range(n)]
  #a = [list(map(int,input().split())) for i in range(n)]
  ans = 0
  count = 0
  lis = []
  
  print((k//2)*((k+1)//2))
  
if __name__ == '__main__':
  main()

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:
    P = (k // 2) * ((k // 2) + 1)
    print(P)
else:
    P = (k // 2)**2
    print(P)

Submission status: Accepted

Solution code:
import math

n = int(input())

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

Submission status: Accepted

Solution code:
a = int(input())
print((a//2) * ((a+1)//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)*((K+1)//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
r, q = divmod(int(input()), 2)
print((r + q) * r)

Submission status: Accepted

Solution code:
def Pair(k):

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#ABC-108-A
K = int(input())
if K % 2 == 1:
    print(K//2 * (K//2+1))
else:
    print(K//2 * K//2)

Submission status: Accepted

Solution code:
K = int(input())
print((K-(K//2))*(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(int(K**2/4))
else:
  print(int((K+1)*(K-1)/4))

Submission status: Accepted

Solution code:
#template
from collections import Counter
def inputlist(): return [int(j) for j in input().split()]
#template
K = int(input())
if K % 2 == 0:
    d = K//2
    print(d**2)
    exit()
else:
    da = (K+1)//2
    db = (K-1)//2
    print(da*db)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k = int(input())

if k % 2 == 0:
  gusu, kisu = k / 2, k / 2
else:
  gusu, kisu = math.floor(k / 2), math.ceil(k / 2)

print(int(gusu*kisu))

Submission status: Accepted

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
#!/usr/bin/env python3

import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

k = I()
a = k // 2
b = (k-1) // 2 + 1
ans = a*b
print(ans)

Submission status: Accepted

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

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:
    print(int((K/2)*(K/2)))
else:
    print(int(((K-1)/2)*((K+1)/2)))

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

Submission status: Accepted

Solution code:
from collections import deque
from collections import Counter
from itertools import product, permutations,combinations
from operator import itemgetter
from heapq import heappop, heappush
from bisect import bisect_left, bisect_right, bisect
#pypyではscipy, numpyは使えない
#from scipy.sparse.csgraph import shortest_path, floyd_warshall, dijkstra, bellman_ford, johnson, minimum_spanning_tree
#from scipy.sparse import csr_matrix, coo_matrix, lil_matrix
#import numpy as np
from fractions import gcd
from math import ceil,floor, sqrt, cos, sin, pi, factorial
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10**8)
INF = float('inf')
from datetime import datetime as dt

def main():
  k = int(input())
  if k%2==0:
    print((k//2)**2)
  else:
    print((k//2)*(k//2+1))
  
  
  
if __name__ == '__main__':
  main()

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)*(K//2))
else:
    print((K//2)*(K//2+1))

Submission status: Accepted

Solution code:
# ABC 108: A – Pair
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())
if(K%2==0):
    num=(K/2)**2
else:
    num=(K-1)/2*(((K-1)/2)+1)
print(int(num))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
def count_odd_even(N):
    n = N//2
    m = N%2
    c_odd = n+m
    c_even= n
    return c_odd, c_even

N = int(input())
odd, even = count_odd_even(N)
print(odd*even)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

k = int(sys.stdin.readline().rstrip())

def main():
    x = k // 2
    y = k - x
    print(x * y)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    if a[0] %2 ==1:
        print((a[0]//2)*(a[0]//2+1))
    else:
        print((a[0]//2)*(a[0]//2))

Submission status: Accepted

Solution code:
N = int(input())
if N%2 == 1:
    ans = (N//2)*(N//2 + 1)
    print(ans)
else:
    ans = (N//2)**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())
num_even = K // 2
num_odd = K - num_even
print(num_even * num_odd)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
K = int(input())

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

print(res)

Submission status: Accepted

Solution code:
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))

k = ii()
even = k//2
if k%2 == 0:
    odd = k//2
else:
    odd = k//2+1

print(even*odd)

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

o_, e_ = 0,0

for i in range(1,n + 1):
	if i % 2 == 0:
		e_ += 1
	else:
		o_ += 1
print(e_ * o_)

Submission status: Accepted

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

Submission status: Accepted

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

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 == 1:
    ans = ((K+1)//2) * (K//2)
    print(ans)
else:
    ans = (K//2)**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:
N = int(input())
if N % 2 == 0:
  print(N//2 * N//2)
else:
  print(N//2 * (N+1)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
print(n // 2 * (n - n // 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
K=int(input())

even = K//2
odd = K-even

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//2+1)))

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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

print(odd * even)

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from itertools import combinations as comb


def main():
    k = int(input())
    pairs = list(comb(range(1, k+1), 2))

    ans = 0
    for pair in pairs:
        if pair[0] % 2 == 0 and pair[1] % 2 != 0:
            ans += 1
        elif pair[0] % 2 != 0 and pair[1] % 2 == 0:
            ans += 1
    print(ans)


if __name__ == "__main__":
    main()

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:
k = int(input())
num = k // 2
if k % 2 == 1:
  print(num * (num + 1))
else:
  print(num * num)

Submission status: Accepted

Solution code:
# | Its_Rashid | #
import math
a = int (input())
print(a // 2 * math . ceil(a / 2))

Submission status: Accepted

Solution code:
K = int(input())

numO = K//2
numE = (K+1)//2

print(numO*numE)

Submission status: Accepted

Solution code:
n = int(input())
print((n//2)*((n+1)//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())

ans=0
for i in range(k):
    for j in range(k):
        if (i%2==0 and j%2==1) or (i%2==1 and j%2==0):
            ans+=1
print(ans//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#abc108 a
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:
def isneg(x):
    if x[0]=="-": return True
    else: return False


def neg(x):
    if isneg(x): return x[1:]
    else: return "-" + x

    
def zerot(x):
    rx = list(x[::-1])
    while rx[-1] == "0":
        rx.pop()
        if len(rx) == 0: 
            rx = ["0"]
            break
    return "".join(rx[::-1])


def zerocut(x):
    if isneg(x):
        ans = neg(zerot(neg(x)))
        if ans == "-0": return "0"
        return ans 
    else:
        return zerot(x)


def bigsmal(x, y):
    if isneg(x) or isneg(y): raise Exception("negative input")
    if len(x) > len(y):
        return x,y
    elif len(x) < len(y):
        return y,x
    else: return tuple(sorted([x, y])[::-1])
    
    
def bigsmall(x, y):
    if (not isneg(x)) and isneg(y):
        return x,y
    elif isneg(x) and (not isneg(y)):
        return y,x
    elif (not isneg(x)) and (not isneg(y)):
        return bigsmal(x, y)
    elif isneg(x) and isneg(y):
        tmp = bigsmal(neg(x), neg(y))[::-1]
        return tuple(neg(i) for i in tmp)
        
    
def ad(x, y):
    if isneg(x) or isneg(y): raise Exception("negative input")
    ra = [0] * (max(len(x), len(y)) + 1)
    rx = [int(i) for i in x][::-1]
    ry = [int(i) for i in y][::-1]
    for i in range(len(rx)): ra[i] += rx[i]
    for i in range(len(ry)): ra[i] += ry[i]
    for i in range(len(ra) - 1):
        ra[i+1] += ra[i] // 10
        ra[i] = ra[i] % 10
    ans = "".join([str(i) for i in ra][::-1])
    return zerocut(ans)


def s_b(x, y):
    if isneg(x) or isneg(y): raise Exception("negative input")
    if bigsmall(x, y) != (x, y): raise Exception("not x>=y error")
    ra = [0] * (max(len(x), len(y)))
    rx = [int(i) for i in x][::-1]
    ry = [int(i) for i in y][::-1]
    for i in range(len(rx)): ra[i] += rx[i]
    for i in range(len(ry)): ra[i] -= ry[i]
    for i in range(len(ra) - 1):
        if ra[i] < 0:
            ra[i] = 10 + ra[i]
            ra[i+1] -= 1
    ans = "".join([str(i) for i in ra][::-1])    
    return zerocut(ans)


def sb(x, y):
    if isneg(x) or isneg(y): raise Exception("negative input")
    if (x, y) == bigsmall(x, y):
        return s_b(x, y)
    else:
        return neg(s_b(y, x))


def add(x, y):
    if isneg(x) and isneg(y):
        return neg(ad(neg(x), neg(y)))
    elif (not isneg(x)) and (not isneg(y)):
        return ad(x, y)
    elif (not isneg(x)) and isneg(y):
        return sb(x, neg(y))
    elif isneg(x) and (not isneg(y)):
        return sb(y, neg(x))
    

def sub(x, y):
    if isneg(x) and isneg(y):
        return sb(neg(y), neg(x))
    elif (not isneg(x)) and (not isneg(y)):
        return sb(x, y)
    elif (not isneg(x)) and isneg(y):
        return ad(x, neg(y))
    elif isneg(x) and (not isneg(y)):
        return neg(ad(neg(x), y))
        

def ml(x, y):
    if isneg(x) or isneg(y): raise Exception("negative input")
    ra = [0] * (len(x) + len(y))
    rx = [int(i) for i in x][::-1]
    ry = [int(i) for i in y][::-1]
    for i in range(len(rx)):
        for j in range(len(ry)):
            ra[i+j] += rx[i] * ry[j]
    for i in range(len(ra) - 1):
        ra[i+1] += ra[i] // 10
        ra[i] = ra[i] % 10
    ans = "".join([str(i) for i in ra][::-1])
    return zerocut(ans)
    

def mul(x, y):
    if isneg(x) and isneg(y):
        return ml(neg(y), neg(x))
    elif (not isneg(x)) and (not isneg(y)):
        return ml(x, y)
    elif (not isneg(x)) and isneg(y):
        return neg(ml(x, neg(y)))
    elif isneg(x) and (not isneg(y)):
        return neg(ml(neg(x), y))
        

def mod2(x):
    return int(x[-1]) % 2


def div2(x):
    if isneg(x): raise Exception("negative input")
    ans = [0] * len(x)
    xs = [int(i) for i in x]
    for i in range(len(x)-1):
        ans[i] += xs[i]
        ans[i+1] += (ans[i]%2) * 10
        ans[i] //= 2
    ans[len(x)-1] = (ans[len(x)-1] + xs[len(x)-1])//2
    ans = "".join([str(i) for i in ans])
    return zerocut(ans)


n = input()
even = div2(n)
odd = sub(n, even)
print(mul(even, odd))

Submission status: Accepted

Solution code:
k = int(input())

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

Submission status: Accepted

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

if k % 2 == 0:
    print(round(t))
else:
    print(round(t))

Submission status: Accepted

Solution code:
import sys
import os


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

    K = int(sys.stdin.readline().rstrip())
    e = K // 2
    o = K // 2 if K % 2 == 0 else K // 2 + 1
    print(e * o)


if __name__ == '__main__':
    main()

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)*(k//2+1))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Pair
k=int(input())
even=[]
odd=[]
for i in range(1,k+1):
    if (i%2==0):
        even.append(i)
    else:
        odd.append(i)

print(len(even)*len(odd))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import fractions

a=int(input())
# a,b=map(int, input().split())
print(a//2*((a+1)//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
N = int(input().strip())

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

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:
n = int(input())
#偶数の個数
even = n//2
#奇数の個数
odds = (n+1)//2

print(even * odds)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# Problem A - Pair

K = int(input())
odd_list = []
even_list = []

for k in range(1, K+1):
    if k%2==0:
        even_list.append(k)
    else:
        odd_list.append(k)

print(len(odd_list)*len(even_list))

Submission status: Accepted

Solution code:
n = int(input())
ans = (n // 2) * ((n - 1) // 2 + 1)
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:
#A - Pair
K = int(input())
if K % 2 == 0:
    print(int(K/2*K/2))
else:
    print(int((K//2+1)*int(K//2)))

Submission status: Accepted

Solution code:
K = int(input())

E = K // 2

if K % 2 == 0:
  O = E
else:
  O = K // 2 +1

print(E * O)

Submission status: Accepted

Solution code:
# 2020/03/07
# AtCoder Beginner Contest 108 - A

# Input
k = int(input())

# Calc
if k % 2 == 0:
    ans = (k // 2) ** 2
else:
    ans = (k // 2) * ((k // 2) + 1)

# Output
print(ans)

Submission status: Accepted

Solution code:
import itertools
k = int(input())
cnt = 0
lists = list(range(1,k+1))
for i,j in itertools.combinations(lists,2):
    if i % 2 == 1:
        if j % 2 == 0:
            cnt += 1
    elif i % 2 == 0:
        if j % 2 == 1:
            cnt += 1

print(cnt)

Submission status: Accepted

Solution code:
# coding: utf-8

k = int(input())

even = int(k/2)

odd = even

if k % 2 != 0:
    odd += 1

print(even*odd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
k = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
k = int(input())
even = k // 2
odd = k - even
print(even * odd)

Submission status: Accepted

Solution code:
K = int(input())

from math import ceil

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
print((N // 2) * -(-N // 2))

Submission status: Accepted

Solution code:
K = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
print(k//2*(k-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:
from math import ceil
k=int(input())
print((k-ceil(k/2))*ceil(k/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

K = ir()
odd = (K+1) // 2
even = K // 2
print(odd * even)
# 41

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())
l = [i for i in range(1, n+1)]
print(len(l[::2]) * len(l[1::2]))

Submission status: Accepted

Solution code:
k = int(input())

even = k // 2
odd = k - even
print(even * odd)

Submission status: Accepted

Solution code:
n=int(input())

gu = []

ki = []

for i in range(1,n+1):
    if i%2==1:
        gu.append(i)
    else:
        ki.append(i)

print(len(gu)*len(ki))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

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

else:
    print(((k//2)*int(k//2+1)))

Submission status: Accepted

Solution code:
n = int(input())
q, r = divmod(n, 2)
print(q*(q+r))

Submission status: Accepted

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

Submission status: Accepted

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

K = int(input().strip())

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

Submission status: Accepted

Solution code:
import math
def comb(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

n = int(input())

if n%2 == 0:
    print(comb(n//2, 1)**2)
elif n%2 == 1:
    print(comb(n//2+1, 1)*comb(n//2, 1))

Submission status: Accepted

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

print(answer)

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())
even = K // 2
odd = (K+1) // 2
print(even * odd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input_methods=['clipboard','file','key']
using_method=0
input_method=input_methods[using_method]

IN=lambda : map(int, input().split())
mod=1000000007

#+++++

def main():
	a = int(input())
	even=a//2
	odd=(a+1)//2

	print(even*odd)
	
	
#+++++
isTest=False

def pa(v):
	if isTest:
		print(v)
		
def input_clipboard():
	import clipboard
	input_text=clipboard.get()
	input_l=input_text.splitlines()
	for l in input_l:
		yield l

if __name__ == "__main__":
	if sys.platform =='ios':
		if input_method==input_methods[0]:
			ic=input_clipboard()
			input = lambda : ic.__next__()
		elif input_method==input_methods[1]:
			sys.stdin=open('inputFile.txt')
		else:
			pass
		isTest=True
	else:
		pass
		#input = sys.stdin.readline
			
	ret = main()
	if ret is not None:
		print(ret)

Submission status: Accepted

Solution code:
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

K = ni()

e, o = 0, 0
ans = 0
for i in range(1, K + 1):
    if i % 2 == 0:
        e += 1
        ans += o
    elif i % 2 == 1:
        o += 1
        ans += e

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
odd = a//2
even = a - odd
print(odd * even)

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())
print((k//2)*((k+1)//2))

Submission status: Accepted

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

tmp = 0
while True:
	tmp += (K // 2)
	K = K - 1
	if (K == 0):
		break

print(tmp)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(10 ** 9)
input = sys.stdin.readline

######################################################

K = [int(_) for _ in input().split()][0]
g = k = K // 2
if K % 2 == 1:
    k += 1
print(g * k)

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(K // 2 * K // 2)
else:
  print((K + 1) // 2 * (K - 1) // 2)

Submission status: Accepted

Solution code:
K = int(input())

k = K//2 + 1 if K%2==1 else K//2

print((K//2)*k)

Submission status: Accepted

Solution code:
from itertools import product
K = int(input())
even = [x for x in range(1, K+1) if x % 2 == 0]
odd = [x for x in range(1, K+1) if x % 2 != 0]
print(len(list(product(even, odd))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())

a = k//2
b = -(-k//2)

print(a*b)

Submission status: Accepted

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

print(even*odd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
k = int(input())
if k%2 == 0:
    print(int(k/2*k/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+1)//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//2+1))

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())
even = k // 2
odd = k - even
print(even * odd)

Submission status: Accepted

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

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())

a = int(k/2)

if k%2 == 0:
  o = int(k/2)
else:
  o = int(k/2) + 1

print(o*a)

Submission status: Accepted

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