TnT/Multi_CodeNet4Repair huggingface dataset:
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def m():
    n = int(input())
    if n % 2 == 0:
        return n
    return n*2

def m():
    n = int(input())
    if n % 2 == 0:
        return n
    return n*2

print(m())

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
i = n % 2

if i == 0:
  print(n)
else
  print(n*2)

n = int(input())
i = n % 2
 
if i == 0:
  print(n)
else:
  print(n*2)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = input()
aryA = input().split(" ")

N = int(N)
aryA = [int(s) for s in aryA]
n = len(aryA)

tot = []
totlist = []
b = N

for m in range(b):
    for x in range(n):
        tot.append(abs(aryA[x] - (m + x + 1)))
    totlist.append(sum(tot))

print(min(totlist))

N = input()
N = int(N)
def gcd(a, b):
	while b:
		a, b = b, a % b
	return a

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

print(lcm(2, N))

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

n = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N=int(input())
if N%2==0:
  ans=N
else:
  ans=2N
print(ans)

N=int(input())
if N%2==0:
  ans=N
else:
  ans=2*N
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().strip().split()))
min_n = max_n = A[0]
for i in range(1, N):
	num = A[i]
	if min_n > num:
		min_n = num
	if max_n < num:
		max_n = num
result = max_n - min_n
print(result)
		

N = int(input())
result = N if N&1==0 else N<<1
print(result)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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


 = int(input())
  2 
  3 if n % 2 == 0:
  4     print(n)
  5 else:
  6     print(n*2)


n = int(input())

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


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
print(n) if n%2 == 0 else print('No')

n = int(input())
print(n) if n%2 == 0 else print(n*2)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n=int(input())
for i in 10**9:
  if n%2==0 and n%i==0:
    print(i)
    exit()

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def gcd(n, m):
    
    a = max(n,m)
    b = min(n,m)
    while b:
        a, b = b, a % b
    return a

n = input()
print(2*n/gcd(2,n))

def gcd(n, m):
    
    a = max(n,m)
    b = min(n,m)
    while b:
        a, b = b, a % b
    return a

n = int(input())
print(2*n//gcd(2,n))

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
x = input()
if x % 2 == 0:
	print(x)
else:
	print(x*2)


x = int(input())
if x % 2 == 0:
	print(x)
else:
	print(x*2)


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
i = input()

if i % 2 == 0:
    print(i)
else:
    print(i*2)

i = int(input())

if i % 2 == 0:
    print(i)
else:
    print(i*2)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if n%2:
  print(2+n)
else:
  print(n)

n = int(input())

if n%2:
  print(2*n)
else:
  print(n)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
if n%2==0:
  print(n)
else:
  print(n*2)

from fractions import gcd
print(int(2 * n / gcd(2, n)))

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

n = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    if N % 2 == 0:
        print(N)
    else:
        print(N*2)

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#999999999\
#'''


# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]


# -*- coding: utf-8 -*-
import sys
# ----------------------------------------------------------------
# Use Solve Function

def solve(lines):
    N = int(lines.pop(0))
    if N % 2 == 0:
        print(N)
    else:
        print(N*2)

#
# main
#

# 1. use list instead of stdin

#contents = '''\
#999999999\
#'''


# 2. use stdin

lines = [x.strip() for x in sys.stdin.readlines()]

#
# solve !!
#
solve(lines)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
if a%2 == 0:
    print(a)
else:
    print(a*2)

a = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input().split())
if n % 2 == 0:
  print(n)
else:
  print(n*2)

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n=int(input())
print([N,N*2][N%2])

N=int(input())
print(N+N%2*N)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

N = int(input())
print(N if N%2==0 and N/N else int(N)*2)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a=int(input());print(a+(a%2>0))

a=int(input());print(a+(a%2>0)*a)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
i = 0
while True:
  if n*i % 2 == 0:
    print(n*i)
    break
  i += 1

n = int(input())
i = 1
while True:
    if n*i % 2 == 0:
        print(n*i)
        break
    i += 1

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import numpy as np
from statistics import median
N = int(input())
A = list(map(lambda x:int(x),input().split(" ")))
npA = np.array(A)
B = npA-(1+np.arange(len(npA)))
opt_b = median(B)
print(int(np.sum(np.abs(B-opt_b))))

N = int(input())
if N%2 == 0:
    ans = N
else:
    ans = N*2
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
a = list(map(int, input().split()))
sadlist = []
for h in range(n):
    a[h] = a[h] - (h + 1)
for i in a:
    sad = 0
    for j in range(n):
        sad = sad + abs(a[j] - i)
    sadlist.append(sad)
print(min(sadlist))

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

for i in range(n, 1e9+1):
    if i % n == 0 && i % 2 == 0:
        print(i)
        break

n = int(input())
while True:
    if i % 2 == 0 and i % n == 0:
      	print(i)
        break
    i += 1


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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import numpy as np
N=int(input())
def gcd(N,2):
  c=int(np.floor(N%2))
  return N-2*c
if gcd(N,2)==0:
  print(N)
else:
  print(2*N)

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
if N % 2 == 0:
    print(N)
else:
    print(N)

N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(N)

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def run(n):
    if n % 2 == 0:
        return n
    else:
        return n * 2


def read_line():
    n = map(int, input().split())
    return n


def main():
    n = read_line()
    print(run(n))


if __name__ == '__main__':
    main()


def run(n):
    if n % 2 == 0:
        return n
    else:
        return n * 2


def read_line():
    n = int(input())
    return n


def main():
    n = read_line()
    print(run(n))


if __name__ == '__main__':
    main()

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):







from itertools import accumulate

N=int(input())
A=list(map(int,input().split()))
SumA=list(accumulate(A))

tmpP=tmpQ=tmpR=tmpS=0
P=Q=R=S=0
ans=10e9
l = 0
r = 2


for mid in range(1,N-2):

	

	
	
	while l < mid and abs((SumA[mid] - SumA[l+1])-SumA[l+1]) < abs((SumA[mid] - SumA[l])-SumA[l]):
		l += 1

	
	
	while r < N-1 and abs((SumA[N-1]-SumA[r+1])-(SumA[r+1]-SumA[mid])) < abs((SumA[N-1] - SumA[r])-(SumA[r] - SumA[mid])):
		r += 1

	#print("{},{}".format(mid,l))

	P=SumA[l]
	Q=SumA[mid]-SumA[l]
	R=SumA[r]-SumA[mid]
	S=SumA[N-1]-SumA[r]

	#print(P,Q,R,S)
	diff=max(P,Q,R,S)-min(P,Q,R,S)
	diff=abs(diff)
	ans = min(ans,diff)

print(ans)




N=int(input())

N_MAX = int(10e9)

start = N
interval = N

ans = 0

for x in range(N,N_MAX,N):
	# print(x)
	if x % N == 0 and x % 2 == 0:
		ans = x
		break

print(ans)


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

print(max(A)-min(A))



N = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
#!/usr/bin/python3

n = int(input())
a = [int(_) for _ in input().split()]

p = a[0]
q = a[1]
r = a[2]
s = 0
for i in range(3, n):
    s += a[i]

d1 = 0
d3 = 2
while s - r > a[d3]:
    d3 += 1
    r += a[d3]
    s -= a[d3]

ans = float('inf')
for d2 in range(1, n - 1):
    ans = min(ans, max(p, q, r, s) - min(p, q, r, s))
    q += a[d2 + 1]
    while q - p > a[d1]:
        if d1 + 1 == d2 + 1:
            break
        d1 += 1
        p += a[d1]
        q -= a[d1]
    r -= a[d2 + 1]
    if d2 + 1 == d3:
        d3 += 1
        r += a[d3]
        s -= a[d3]
    while s - r > a[d3]:
        if d3  == n - 1:
            break
        d3 += 1
        r += a[d3]
        s -= a[d3]

print(ans)


#!/Library/Frameworks/Python.framework/Versions/3.5/bin/python3

n = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n,*l=map(int,open(0).read().split())
a=sum(l[i]-i-1for i in range(n))//n
f=lambda x:sum(abs(l[i]-i-1-x)for i in range(n))
print(min(f(a-1),f(a),f(a+1)))

n=int(input());print(n*(n%2+1))

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = input()
a = input().split(' ')
result = 0
for i in range(len(a)):
	for j in range(i+1, len(a)):
		diff = abs(a[i]-a[j])
		if diff > result:
			result = diff
print(result)

n = int(input())
a = list(map(int, input().split()))

for i in range(n):
    a[i] -= i + 1

a.sort()

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

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

n=int(input())
print(n if n%2==0 else 2*n)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if N%2 == 0:
    ans = N
else:
    ans = 2 * N
    
    
print(N)

N = int(input())
A = list(map(int, input().split()))
A = [A[i]-(i+1) for i in range(N)]

ans = float("inf")
for b in range(min(A), max(A)+1):
    loss = sum([abs(A[i] - b) for i in range(N)])
    ans = min(ans, loss)


print(ans)


N = int(input())

if N % 2 == 0:
    ans = N
else:
    ans = 2 * N


print(ans)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a = int(input())
ans = 0
if a % 2 == 0:
    ans = a
elif a[i] == "-":
    ans = a * 2

print(ans)



a = int(input())
ans = 0
if a % 2 == 0:
    ans = a
else:
    ans = a * 2

print(ans)



Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

n = int(input())
print(2*n-((n%2 == 0)*n))

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = input()
A = list(map(int, input().split()))
print(int(max(A)) - int(min(A)))

N = input()

if N % 2 == 0:
  print(int(N))
else:
  print(int(2*N))

n = input()
A = list(map(int, input().split()))
print(int(max(A))-int(min(A)))

N = input()
A = list(map(int, input().split()))
print(int(max(A)) - int(min(A)))

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if x%2 == 0:
  print(x)
else:
  print(x*2)

x = int(input())
 
if x%2 == 0:
  print(x)
else:
  print(x*2)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

def sunuke(b):
    ret = 0
    sub = 1
    for a in A:
        ret += abs(a - (b+ sub))
        sub += 1
    return ret


B = []

sub = 1
for a in A:
    b = a - sub
    B.append(b)
    sub += 1

B.sort()
b1 = N // 2
if N < 3:
    print(sunuke(B[b1]))
    exit()

b2 = b1 + 1
b1_s = sunuke(B[b1])
b2_s = sunuke(B[b2])
if b1_s < b2_s:
    print(b1_s)
else:
    print(b2_s)


N = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a = int(input())
b = 2
x = a * b

if a < b:
    tmp = a
    a = b
    b = tmp

r = a % b
while r != 0:
    a = b
    b = r
    r = a % b

print(x/b)


a = int(input())
b = 2
x = a * b

if a < b:
    tmp = a
    a = b
    b = tmp

r = a % b
while r != 0:
    a = b
    b = r
    r = a % b

print(int(x/b))


Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
#coding:utf-8
n = int(input())
nums = list(map(int,input().split()))

nums = [num - i for i,num in enumerate(nums,1)]
nums.sort()

sums = [None for i in range(n)]
sums[0] = nums[0]
allv = sum(nums)
minv = nums[0] * (1 - n) - 2 * sums[0] + allv
for i in range(n-1):
    sums[i+1] = sums[i] + nums[i+1]
    for b in range(nums[i], nums[i+1]+1):
        p = b * (2*(i+1) - n) -2 * sums[i] + allv
        minv = min(minv,p)

print(minv)


#coding:utf-8
a = int(input())

def gcd(a, b):

	while b:

		a, b = b, a % b

	return a

g = gcd(a,2)
l = a * 2 // g
print(l)


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
# encoding: utf-8
import math
N = int(input())
A = list(map(int, input().split()))

def binsearch(seq, l, r, tar):
    # print("##", l, r, LmR[l:r + 1], tar)
    m = l + (r - l) // 2
    if l >= r: return l
    elif seq[m] < tar: return binsearch(seq, m + 1, r, tar)
    else: return binsearch(seq, l, m, tar)

Asum = [0]
tmp = 0
for Ai in A:
    tmp += Ai
    Asum.append(tmp)

LmR = []
for SAi in Asum[:-1]:
    LmR.append(-Asum[-1] + 2 * SAi)

ans = max(A) - min(A)
for b2 in range(2, N - 1):
    # b1
    
    tar = -(Asum[N] - Asum[b2])
    b1 = binsearch(LmR, 1, b2 - 1, tar)
    if tar - LmR[b1 - 1] < LmR[b1] - tar: b1 = max((1, b1 - 1))
    
    if math.fabs((Asum[b2] - Asum[b1]) - (Asum[b1])) >= ans: continue
    # b3
    
    tar = Asum[b2]
    b3 = binsearch(LmR, b2 + 1, N - 1, tar)
    if tar - LmR[b3 - 1] < LmR[b3] - tar: b3 = max((b2 + 1, b3 - 1))
    parts = (Asum[b1], Asum[b2] - Asum[b1], Asum[b3] - Asum[b2], Asum[-1] - Asum[b3])
    # print("#", A[:b1], A[b1:b2], A[b2:b3], A[b3:], parts)
    if max(parts) - min(parts) < ans: ans = max(parts) - min(parts)
    
print(ans)

# encoding: utf-8
N = int(input())
if N % 2: print(2 * N)
else: print(N)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

n=int(input())
print(n+n%2*n)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

n = int(input())
print(n*2) if n%2 else print(n)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def solve():
    n = int(input())
    i = n
    while True:
        if i % 2 == 0 and i % n == 0:
            print(i)
            exit()


if __name__ == "__main__":
    solve()


def solve():
    n = int(input())
    i = n
    while True:
        if i % 2 == 0:
            print(i)
            exit()
        i += n



if __name__ == "__main__":
    solve()


Verdicts: Time Limit Exceeded

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a=input()
b=a/2

a=input()
b=int(a/2)

a=input()
#if int(a/2)*2==a:
 # print(a)
#else:
  #print(a*2)
print(a)

a=input()
if a=0:
  print(a)
else:
  print(a*2)


N=input()
n=int(N/2)
if N==n*2:
  print(N)
else:
  print(N*2)

a=input()
if int(a/2)*2==a:
  print(a)
else:
  print(a*2)

a=input()
if a==0:
  print(a)
else:
  print(a*2)


a=int(input())
b=a/2
if b*2==a:
  print(a)
else:
  print(a*2)

a=input()
if int(a/2)*2==a:
  print(a)
else:
  print(a*2)


int(3/2)

a=input()
if int(a/2)*2==a:
  print(a)
#else:
  #print(a*2)


a=int(input())
b=a/2

a=int(input())
b=int(a/2)
if b*2==a:
  print(a)
else:
  print(a*2)

Verdicts: Runtime Error

Runtime Error

Wrong Answer

Runtime Error

Runtime Error

Runtime Error

Wrong Answer

Wrong Answer

Runtime Error

Wrong Answer

Runtime Error

Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if N % 2 == 0:
  print(N)
else:
  print(2N)

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

for i in range(2, 10**9, 2):
    if i % n == 0:
        print(i)


n = int(input())
a = list(map(int, input().split()))

a_d = []
for i in range(1, n+1):
    a_d.append(a[i-1]-i)

d = (list(np.absolute(a_d)))
d.sort()
m = d[int(n/2)]

print(abs(sum(d-m)))


import numpy as np

n = int(input())
a = list(map(int, input().split()))

a_d = []
for i in range(1, n+1):
    a_d.append(a[i-1]-i)

d = (list(np.absolute(a_d)))
d.sort()
m = d[int(n/2)]

print(abs(sum(d-m)))

n = int(input())

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


Verdicts: Time Limit Exceeded

Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

a = [int(i) for i in input().split()]

i=0

max = 0
min = 0
for i in range(n):
  if a[i] >= max:
    max = a[i]
  elif a[i] <= min:
    min = a[i]
  else
    continue
    
print (max - min)
  


n = int(input())


if n % 2:
  print(n*2)
else:
  print(n)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

N = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
for i in range(1,10**9,2):
    if i%2==0 and i%N==0:
        print(i)
        break
#AC


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


Verdicts: Time Limit Exceeded

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n=input();print(n if n%2==0 else n*2)

n=int(input());print(n if n%2==0 else n*2)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if a%n == 2 :
    print(a)
else :
    print(a*2)

a = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n=int(input())
A=list(map(int,input().split()))
print(max(A)-min(A))

n=int(input())
if n%2:
  ans=2*n
else:
  ans=n
print(ans)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
if n % 2 == 0:
  print(n)
elif:
  print(n * 2)

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def main():
	N = int(input())
	seq = list(map(int, input().split()))
	maks = 0
	for i in range(0, N):
		for j in range(i, N):
			maks = max(abs(seq[j] - seq[i]), maks)
	print(maks)
	return 0
main()

def main():
	N = int(input())
	A = list(map(int, input().split()))
	s = sum(A)
	def ano_helper(BCDE):
		BCDE = BCDE + [s - sum(BCDE)]
		BCDE.sort()
		return abs(BCDE[-1] - BCDE[0])
	def helper(BCDEs, inds):
		if len(BCDEs[0]) == 4:
			return BCDEs
		ret_BCDEs = []
		ret_inds = []
		for candidate in range(len(BCDEs)):
			BCDE = BCDEs[candidate]
			ind = inds[candidate]
			ave = sum(A[ind:]) / (5 - len(BCDE))
			temp = 0
			while temp + A[ind] < ave:
				temp += A[ind]
				ind += 1
				if ind == N:
					break
			ret_BCDEs.append(BCDE + [temp])
			ret_inds.append(ind)
			if ind < N:
				ret_BCDEs.append(BCDE + [temp + A[ind]])
				ret_inds.append(ind + 1)
		return helper(ret_BCDEs, ret_inds)
	print(sorted([ano_helper(i[1:]) for i in helper([[0]], [0])])[0])
	return 0
	#BCDE = []
	#ind = 0
	
	#tempBCDE = [[]]
	
	#	temp = 0
	
	#	while temp < (s - su) / (4 - len(BCDE)):
	#		te = A[ind]
	#		temp += te
	#		ret.append(te)
	
	#		ind += 1
	#	tempBCDE.append(ret)
	#print(BCDE)
main()

def main():
	N = int(input())
	seq = list(map(int, input().split()))
	seq = [seq[i] - i - 1 for i in range(N)]
	def helper(b):
		return sum([abs(seq[i] - b) for i in range(N)])
	ave = sum(seq) // N
	print(min(helper(ave), helper(ave + 1)))
	return 0
main()

def main():
	N = int(input())
	if N % 2:
		print(2 * N)
	else:
		print(N)
	return 0
main()

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
i = int(input())
if i % 2 == 0:
  print(i)
else:
  print(i*2)
print("{}".format((i * 2) if i%2 ==1 else 0))

i = int(input())
if i % 2 == 0:
  print(i)
else:
  print(i*2)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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



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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if N%2==0:
  print(N)
else:
  print(2N)


n = input()
a = list(map(int, input().split()))
a.sort()
print(a[-1] - a[0])


N = int(input())

if N%2==0:
  print(N)
else:
  print(2 ＊ N)


n = int(input())
S = list(map(int, input().split()))
S = sorted(S)
print(a[-1] - a[0])


N = int(input())

if N%2==0:
  print(N)
else:
  print(2＊N)

n = int(input())
S = list(map(int, input().split()))
a = sorted(S)
print(a[-1] - a[0])


N = int(input())

if N%2==0: 
         print(N)
else:
         print(2 ＊ N)


n = int(input())
a = list(map(int,input().split()))
a = sorted(a)
print(a[-1]-a[0])

N = int(input())

if N%2==0:
  print (N)
else:
  print (2 ＊ N)


n = int(input())
S = list(map(int,input().split())

a=soretd(S)
print(max(a)-min(a))

N = int(input())

if N%2==0:
  print(N)

else:
  print(2 ＊ N)


n = int(input())
S = list(map(int, input().split()))
S = sorted(S)
print(S[-1] - S[0])


n = int(input())
A = list(map(int,input().split()))
A = sorted(A)
x = A[-1]-A[0]
print(x)


N = int(input())

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




Verdicts: Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n=int(input())
print([n,n*2][n%2==0])

n=int(input())
print([n,n*2][n%2==1])

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a,b = map(int,input().split())


print(int((b-a)*(b-a+1)/2-b))

n = int(input())

m = 10000000000000000

for i in range(n,m,n):
	if i % 2 == 0:
		print(i)
		break    

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import numpy as np
N=int(input())
A=list(map(int,input().split()))
B=[A[i]-i-1 for i in range(N)]
B.sort()
if N%2==0:
    b=B[N//2]
else:
    b=(B[N//2-1]+B[N//2])//2
print(int(sum([abs(Bb-b) for Bb in B])))


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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
def maxElem( lis ):
  L = lis[:]#copy
  S = set(lis)
  S = list(S)
  MaxCount=0
  ret='nothing...'

  for elem in S:
    c=0
    while elem in L:
      ind = L.index(elem)
      foo = L.pop(ind)
      c+=1
    if c>MaxCount:
      MaxCount=c
      ret = elem
  return ret

if __name__ == "__main__" :
    n = int(input())
    array = list(map(int, input().split()))

    for i in range(0, n):
        array[i] = array[i] - (i + 1)
    elem = int(maxElem(array))
    
    for i in range(0, n):
        array[i] = abs(array[i] - elem)

    sum_n = sum(array)

    print(sum_n)

N = int(input())
if N % 2 != 0:
    N = N * 2

print(N)  


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

n = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
a = list(int(i) for i in input().split())
a.sort(reverse = True)
print(a[0]-a[-1])

N = int(input())
a = list(int(i) for i in input().split())
a.sort(reverse = True)
print(a[0]-a[-1])

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

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
o=input()
a=list(map(int,input().split()))
print(max(a)-min(a))


input()
a=list(map(int,input().split()))
print(max(a)-min(a))


_=int(input())
print(_<<(_&1))

Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
L = 0
I = 1
N = int(input())
if N < 1 or N > 10:
    print('invalido!')
if (N >= 1 and N <= 10):
    while L == 0:
        if (I % 2 == 0 and I % N == 0):
            print(I)
            L = 1
        I +=I


def main():
    a, b = 2, int(input())
    ta, tb = a, b
    if b == 0: return 0
    while a%b != 0:
       a, b = b, a%b
    return int((ta*tb)/b)
main()

n = int(input())
contador = 0
res = 0
while(True):
    contador += 1
    if contador % 2 == 0 and contador % n == 0:
        res = contador
        break;
print(res,'\n')

def smaller_divisible_number(num: int) -> int:
    smaller_divisible_number = num
    if num%2 != 0:
        smaller_divisible_number *= 2
    return smaller_divisible_number

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


Verdicts: Wrong Answer

Wrong Answer

Time Limit Exceeded

Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
# -*- coding: utf-8 -*-

n = int(input())


#     if i % 2 == 0 and i % n == 0:
#         print(i)
#         break

if n % 2 == 0:
    print(n) 
else:
    print(2n) 

# -*- coding: utf-8 -*-

n = int(input())


#     if i % 2 == 0 and i % n == 0:
#         print(i)
#         break

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N=int(input())
for i in range(1,2N):
  if i%2==0 and i%N==0:
    print(i)
    break

N=int(input())
for i in range(1,2*N):
  if i%2==0 and i%N==0:
    print(i)
    break

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

Verdicts: Runtime Error

Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
b = [a[i]-(i+1) for i in range(n)]
b = sorted(b)
mid = b[n//2]
sum = 0
for i in range(n):
    sum+=abs(a[i]-(mid+(i+1)))
print(sum)


N=input();print(N*(N%2+1))

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
list = [int(i) for i in input().split()]

n_max = max(list)
n_min = min(list)

print(n_max - n_min)

n = int(input())
mod = n%2
if mod==0:
    dst = n
else:
    dst = n*2

print(dst)

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N=int(input())
lst=input().split()
lst_i=[int(i) for i in lst]
a=max(lst_i)
b=min(lst_i)
print(abs(a-b))

N=int(input())
a=list(map(int,input().split()))
print(abs(max(a)-min(a)))

N=int(input())

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


Verdicts: Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a = list(map(int,input().split()))

if int(a[0]) %2 == 0:
    print(a)
else:
    print(a*2)


a = map(int,input().split())

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


a = list(map(int,input().split()))
b = int(a[0])
if b %2 == 0:
    print(b)
else:
    print(b*2)

Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
a = int(input())
i = 1
while True:
  if i % 2 == 0 and i % a == 0:
    print(i)
    break
  else:
    i += 2


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

Verdicts: Time Limit Exceeded

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
A = list(map(int, input().split()))

# res = 0

#     res += A[i] - (i+1)
# b = res // N
# print(res, b)
A_sorted = sorted(A)
b = A_sorted[int((len(A)-1)/2)]
b2 = A_sorted[int((len(A)-1)/2 + 1)]

sadness_1 = sum([abs(A[i] - b) for i in range(N)])
sadness_2 = sum([abs(A[i] - b2) for i in range(N)])

print(min(sadness_1, sadness_2))

N = int(input())
A = list(map(int, input().split()))

A_sorted = sorted([A[i] - (i+1) for i in range(N)])
b = A_sorted[int((len(A)-1)/2)]
b2 = A_sorted[int((len(A)-1)/2 + 1)]

sad_1 = sum([abs(A_sorted[i] - b) for i in range(N)])
sad_2 = sum([abs(A_sorted[i] - b2) for i in range(N)])

print(min(sad_1, sad_2))


N = int(input())
A = list(map(int, input().split()))

# res = 0

#     res += A[i] - (i+1)
# b = res // N
# print(res, b)
A_sorted = sorted([A[i] - (i+1) for i in range(N)])
b = A_sorted[int((len(A)-1)/2)]
b2 = A_sorted[int((len(A)-1)/2 + 1)]

print(A_sorted, b, b2)
sad_1 = sum([abs(A_sorted[i] - b) for i in range(N)])
sad_2 = sum([abs(A_sorted[i] - b2) for i in range(N)])

print(min(sad_1, sad_2))

N = int(input())

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

Verdicts: Runtime Error

Runtime Error

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
line = input()
num = [int(n) for n in line.split()][0]
print(num)
smaller_divisible_number = num
if num%2 != 0:
    smaller_divisible_number *= 2
print(smaller_divisible_number)

numero = int(input("escreva o numero "))
if (numero % 2) == 0:
    print(numero)
else:
    print(numero * 2)

x = input()
x = int(x)
if x%2 == 1:
    x = 2*x
    print(x)
else:
    print(x) 

Verdicts: Wrong Answer

Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

a = list(map(int, input().split()))
print(max(a)-min(a))

import math
n = int(input())
print(n*2/math.gcd(n,2))

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

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

while True:
    if result % n == 0:
        print(result)
        break
    result = result * 2


n = int(input())
l = input().split()
l.sort()
print(abs(int(l[0]) - int(l[-1])))

n = int(input())
result = n

while True:
    if (result % n == 0) & (result % 2 == 0):
        print(result)
        break
    result = result * 2


Verdicts: Wrong Answer

Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

for i in range(3,109):
    if(N%2==0 and N%i==0 and N!=i):
        print(i)
        break
        


N=int(input())

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


Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import collections
N=int(input())
l=list(map(lambda x:int(x),input().split(' ')))
l=[l[i]-(i+1) for i in range(N)]
dl=collections.Counter(l)
ans=[0]*(len(dl)//2)
for i in range(len(dl)//2):
    k=dl.most_common()[i][0] 
    k*=-1
    ans[i]=sum([abs(l[j]+k) for j in range(N)])
print(min(ans))

d=int(input())
if d%2==0:
    print(d)
else:
    print(2*d)
    


    

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if N != 1:
    print(int(2*N))


N = int(input())

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

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import math
N=int(input())
print(2*N//gcd(2,N))

import math
N=int(input())
print(2*N//math.gcd(2,N))

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N = int(input())
print(int(2*N / math.gcd(2, N)))

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

if N%2 == 0:
    print N
else:
    print N*2


N = int(input())

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
import fraction
def lcm(x, y):
    return (x * y) // fraction.gcd(x, y)

print(lcm(int(input()), 2))


def gcd(a, b):
    while b:
        a, b = b, a % b
    return a
  
def lcm(x, y):
    return (x * y) // gcd(x, y)

print(lcm(int(input()), 2))


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

value = []
for part in input().split():
  value.append(int(part))

print(max(value) - min(value))

n = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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


Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
N=int(input())
ans=N if N%2==0 else 2*N
print(N)

N=int(input())
ans=N if N%2==0 else 2*N
print(ans)

Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
a = [int(i) for i in input().split()] 

print(max(a) - min(a))

n = int(input())

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

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

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


Verdicts: Wrong Answer

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

Submission attempts (in order):
n = int(input())
a = list(map(int,input().split()))
b = []
for i in range(1,n+1):
    b.append(a[i-1] - i)
b.sort
if n % 2 != 0:
    B = b[int((n-1)/2)]
    ans = 0
    for i in range(n):
        ans += abs(a[i]-i-1-B)
    print(ans)
else:
    big = b[int((n)/2)]
    smo = b[int(n-2/2)]
    smoB = int((big+smo)/2)
    bigB = smoB + 1
    big = smo = 0
    for i in range(n):
        big += abs(a[i]-i-1-bigB)
    for i in range(n):
        smo += abs(a[i]-i-1-smoB)
    print(min(big,smo))

n = int(input())
def get_gcd(a, b): 
    if a < b:
        a, b = b, a
    if a % b == 0:
        return b
    else:
        return get_gcd(b, a % b)
def get_lcm(a, b, gcd): 
    lcm = a * b // gcd
    return lcm
print(int((2 * n) / get_gcd(2,n)))

Verdicts: Runtime Error

Accepted
Problem: You are given a positive integer N. Find the minimum positive integer divisible by both 2 and N.

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

print(2*n if n%2==0 else n)

N = input()

print(N*2)


N = int(input())

print(2*N if N%2==0 else n)

n = int(input())

print(2*n if n%2 else n)

Verdicts: Wrong Answer

Wrong Answer

Runtime Error

Accepted