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):
n = int(input())
if n&1:
    print(2*n)
else
    print(n)


n = int(input())
if n&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):
import copy
input()
a=[int(i) for i in input().split()]
sa=copy.copy(a)
for i in range(len(a)):
    sa[i]=sa[i]-(i+1)
sa.sort()
msa=sa[int(len(sa)/2)]
sb=0
for i in range(len(a)):
    sb=sb+abs(a[i]-(msa+i+1))
print(sb)

import copy
input()
a=[int(i) for i in input().split()]
sa=copy.copy(a)
for i in range(len(a)):
    sa[i]=sa[i]-(i+1)
sa.sort()
b=sa[int(len(sa)/2)]
sb=0
for i in range(len(a)):
    sb=sb+abs(a[i]-(b+i+1))
print(sb)

import copy
input()
a=[int(i) for i in input().split()]
sa=copy.copy(a)
for i in range(len(a)):
    sa[i]=sa[i]-(i+1)
sa.sort()
msa=sa[int(len(sa)/2)]
sb=0
for i in range(len(a)):
    sb=sb+abs(a[i]-(sma+i+1))
print(sb)

import copy
input()
a=[int(i) for i in input().split()]
sa=copy.copy(a)
for i in range(len(a)):
    sa[i]=sa[i]-(i+1)
sa.sort()
b=sa[int(len(sa)/2)]
c=sa[int(len(sa)/2)+1]
sb=0
sc=0
for i in range(len(a)):
    sb=sb+abs(a[i]-(b+i+1))
    sc=sc+abs(a[i]-(c+i+1))
print(min(sb,sc))

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

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

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

#include <string>
#include <fstream>
#include <cmath>

using namespace std;

int main() {
    

    int n;
    cin >> n;
    if (n%2 == 0){
        cout << n << endl;
    }else{
        cout << 2 * n << endl;
    }


}


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())
i = 2
while True:
    if i / N == 0:
        print(i)
        break
    i += 2

N = int(input())
i = 2
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):
import statistics
N = int(input())
A = list(map(int, input().split()))

for i in range(N):
	A[i] = A[i] - (i+1)
A.sort()

if N % 2 == 0:
	med1 = A[N // 2 - 1]
	med2 = A[N //2]
	ans = min(sum([abs(a - med1) for a in A]), sum([abs(a - med2) for a in A]))

else:
	med = A[N // 2]
	ans = sum([abs(a - med) for a in A])
	
print(ans)

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

i = N + 1
while True:
    if(i % 2 == 0 and i % N == 0):
        break
    i = i + 1

print(i)



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

a = int(input())

b = input().split()
b.sort()
min = b[0]
b.reverse()
max = b[0]
print(int(max)-int(min))

# -*- coding: utf-8 -*-
def gcd(x, y):
    while x % y:
        x, y = y, x % y
    return y

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


n = int(input())
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):
import math
N = int(input())

a = 2 * N / math.gcd(2, N)

print(a)

N = int(input())
if N%2==0:
    print(N)
elif N%2!=0:
    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 = input()

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


N = int(input())

if N % 2 != 0:
    answer = N * 2
    print(answer)
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())
for i in range(2*n):
    if i % 2 == 0 and i % n == 0:
        print(i)
        exit()

n=int(input())
print(n if n%2==0 else 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:
	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 = 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(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):
N = int(input())

t = N //2 
intger = []

for n in range(t):
  intg = N / 2
  intger.append(intg)
  N = intg
  
intgersorted = sorted(intger)

print(intger[0])

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 = 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):
a=input()
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 = int(input())
A = list(map(int,input().split()))
ck = 10000000000
for b in range(0,max(A)):
    k = 0
    for i in range(0,N):
        k = k + abs(A[i] - (b+i+1))
    if k < ck:
        ck = k
    elif k >= ck:
        print(ck)
        break


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


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


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):
import math
# input
N = input()

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

print(lcm_base(2, N))

# input
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):
size = int(input())
A = list(map(int,input().split()))
i = list(range(1,size+1))

remain_list = [A-i for(A,i) in zip(A,i)]
while(True):
    zero_count = len([i for i in remain_list if i ==0])
    minus_count = len([i for i in remain_list if i <0])
    plus_count = len([i for i in remain_list if i > 0])

    if zero_count == max(zero_count,minus_count,plus_count) or plus_count == minus_count:
        break

    if plus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num - 1 for num in remain_list]

    if minus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num + 1 for num in remain_list]


sum_list =[abs(num) for num in remain_list]

print(sum(sum_list))


size = int(input())
A = list(map(int,input().split()))
i = list(range(1,size+1))

remain_list = [A-i for(A,i) in zip(A,i)]
while(True):
    zero_count = len([i for i in remain_list if i ==0])
    minus_count = len([i for i in remain_list if i <0])
    plus_count = len([i for i in remain_list if i > 0])

    if zero_count == max(zero_count,minus_count,plus_count) or plus_count == minus_count:
        break

    if plus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num - 1 for num in remain_list]

    if minus_count == max(zero_count,minus_count,plus_count):
        remain_list = [num + 1 for num in remain_list]


sum_list =[abs(num) for num in remain_list]

print(sum(sum_list))


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


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):
def INT(): return int(input())

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

if __name__ == '__main__':
    main()


def INT(): return int(input())

def main():
    N = INT()
    
    if N % 2 == 0:
        print(N)
    else:
        print(2*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):
a = int(input())
items = input().split(" ")
nums = []
for i in range(a):
  nums.append(int(items[i]))
max_num = max(nums)
min_num = min(nums)
print(max_num - min_num)

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 ==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 == 0):
  print(n)
else:
  t=1
  while 1:
    t+=1
    n=n＊t
    if(n%2==0):
      print(n)
      break
      

#!/usr/bin/env python3

n = int(input())

if(n % 2 == 0):
    print(n)
else:
    t = 1
    while True:
        t += 1
        n = n*t
        if(n % 2 == 0):
            print(n)
            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):
n = int(input())
a = list(map(int,input().split()))

d = 0
c = []
for b in range(0,max(a)+1):
    for i in range(0,len(a)):
        d += abs(a[i]-(b+i+1))
    c.append(d)
    d = 0
print(min(c))

n = int(input())
if n % 2 != 0:
    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=int(input())
A = list(map(int, input().split()))

big = max(A)
small = min(A)
print(big - small)


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

big = max(A)
small = min(A)
print(int(big - small))


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

big = max(A)
small = min(A)
print(abs(big - small))


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

big = max(A)
small = min(A)
print(big - small)


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

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):
N = int(input())
if N % 2 != 0:
    n *= 2
print(N)

N = int(input())
if N % 2 != 0:
    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):
num = input()

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

num = input()

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

number = int(input())
nums = list(map(int, input().split(" ")))

print(max(nums) - min(nums))


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

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):
N = 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*2)
else:
    print(n)

n = int(input())
if n % 2 == 1:
    print(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):
import math
n=int(input())
l=list(map(int, input().split()))
for i in range(n):
    l[i]-=(i+1)
avg=sum(l)/n
fb=math.floor(avg)
cb=math.ceil(avg)
sadf=sadc=0
for i in l:
    sadf+=abs(i-fb)
    sadc+=abs(i-cb)

sad=min(sadf, sadc)
print(sad)

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(map(int, input().split()))

for i in range(N):
    A[i] -= i+1

A.sort()
print(A)
median = A[N//2]

for i in range(N):
    A[i] -= median
    A[i] = abs(A[i])
print(sum(A))

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):
N = int(input())
A = input() .split()
a = list(A)
if len(a) == N:
    b = int(max(a))
    s = int(min(a))
    print(b-s)
else:
    N, A, a, b, s = FUCK

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 fractions
N = int(input())
print(2 * N / gcd(2,N))

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

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

import fractions
N = int(input())
print(fractions.gcd(2,N))

import fractions
N = int(input())

print(2*N if N%2==1 else N)

Verdicts: Runtime Error

Runtime Error

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())
a = [int(i) for i in input().split()]

val = []

for i in range(n):
    val.append(a[i]-i)

val.sort()
#print(val)

#idx = [(val[0],0)]
idx = []
cnt = 1
for i in range(n-1):
    if val[i] == val[i+1]:
        #cnt += 1
        if i == n-2:
            idx.append((val[i],i+2))
        continue
    else:
        idx.append((val[i],i+1))
        #cnt = 1
        
ans_val = 0

for i in range(len(idx)):
    if idx[i][1] >= (n) // 2:
        ans_val = idx[i-1][0]

#print(ans_val)
#exit()
     
ans = 0
ans2 = 0
ans3 = 0
for i in range(n):
    ans += abs(a[i]-ans_val-i)
    ans2 += abs(a[i]-ans_val-i+1)
    ans3 += abs(a[i]-ans_val-i-1)
    

print(min(ans,ans2,ans3))

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(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())
if n% !=0:
    print(2*n)
else:
    print(n)

n=int(input())
if n%2 !=0:
    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(n/2)

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 = 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):
import sys
import math
N = input()
AList = list(map(int, input().split()))
listnum = 1000000000

low = -1000000000
high = 1000000000

mode = 1
a1 = 0
a2 = 0
while(True):
    p1 = math.floor((abs(low) + abs(high))/3) + low
    p2 = high - math.floor((abs(low) + abs(high))/3) 

    for j in range(1,int(N)+1):
        a1 += abs(AList[j-1] -(p1 + j))
    for j in range(1,int(N)+1):
        a2 += abs(AList[j-1] -(p2 + j))

    if a1 == a2 or abs(a1-a2) == 1:
        print(min(a1,a2))
        sys.exit()
    elif a1 < a2:
        high = p2
    else:
        low = p1        
    a1 = 0
    a2 = 0

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())
if N % 2 == 0:
    print(N)
else:
    print(2 * N)


from itertools import accumulate

N = int(input())
A = list(map(int,input().split()))
A = list(accumulate(A))
ans = []

for i in range(N-3):
    for j in range(i+1, N-2):
        for k in range(j+1, N-1):
            list = []
            p = A[i]
            q = A[j]-A[i]
            r = A[k]-A[j]
            s = A[-1]-A[k]
            list = [p, q, r, s]
            ans.append(max(list) - min(list))

print(min(ans))


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


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())
li = list(map(int,input().split()))
li.sort()
print(abs(li[-1]-li[0]))


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 main():
    n = int(input())
    if n % 2:
        print(n)
    else:
        print(2 * n)
        

if __name__ == "__main__":
    main()



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

if __name__ == "__main__":
    main()


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==1 else 2*n)

n=int(input())
print(n if n%2==0 else 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):
from itertools import accumulate

def S(a, b):
    return cl[b] - (0 if a == 0 else cl[a-1])

def partial(start, end, last):
    odiff = None
    for c in range(start, end+1):
        p = S(start,c)
        q = S(c+1,end)
        diff = abs(p-q)
        if odiff is None:
            odiff = diff
        if odiff < diff:
            return c, mp, mq
        odiff = diff
        mp = p
        mq = q

if __name__ == '__main__':
    # read input
    n = int(input())
    l = list(map(int, input().split()))
    
    cl = list(accumulate(l))
    clen = len(l)

    
    #  |------|------|-------|-------|
    #         c0    c1       c2
    
    # pick up a c1 (i:i+1) and evaluate
    result = None
    c1 = 1
    c3 = 3
    for i in range(1,clen-2):
        # LEFT
        (c1, mb, mc) = partial(0, i, c1)
        # RIGHT
        c3, md, me = partial(i+1, clen-1, c3)

        # evaluate
        diff = abs(max(mb, mc, md, me) - min(mb, mc, md, me))
        if result is None:
            result = diff
        else:
            if result > diff:
                result = diff

    print(result)

def gcd(a, b):
    while (b > 0):
        a, b = b, a%b
    return a

def lcm(a, b):
    return int(a*b/gcd(a,b))

if __name__ == '__main__':
    r = int(input())
    print(lcm(2, r))

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 math

def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, = read_line(int)

A = [int(x) for x in input().split()]

AA = [a - (i + 1) for i, a in enumerate(A)]

AA.sort()

if len(AA) % 2 == 0:
    b = int(len(AA) / 2 - 1)
else:
    b = int((len(AA) - 1) / 2)

sadness = 0
for i, a in enumerate(A):
    # sadness1 += abs(a - (i + b1 + 1))
    # sadness2 += abs(a - (i + b2 + 1))
    sadness += abs(a - (i + AA[b] + 1))

print(sadness)


def read_line(*types): return [f(a) for a, f in zip(input().split(), types)]

n, = read_line(int)

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):
# your code goes here
a=int(input())
if a%2 == 0:
	k = a
else:
	k = a + 1
while k>0:
	if k %2== 0 and k % a ==0:
		print(k)
		quit()
	k = k + a

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):
import copy

N = int(input())
An = list(map(int, input().split()))
for n in range(N):
    An[n] -= (n+1)

An.sort()

if (N % 2 == 0):
    cent = An[N//2 - 1] + An[N//2] // 2
else:
    cent = An[(N-1)//2]

ans = sum(An) - N * cent

print(ans)



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

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

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 sys
n=int(input())
a=list(map(int,input().split()))

if n==1:
    print(0)
    sys.exit()

def abs(a):
    if a<0:
        return -a
    else:
        return a

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

ans=10**12
a.sort()
if n<50:
    for b in a:
        S=0
        for j in range(n):
            S+=abs(a[j]-b)
        ans=min(ans,S)
    if ans==10**12:
        ans=0
    print(ans)
    sys.exit()

mid=n//2
if a[mid]<0:
    b_choice=a[mid-20:mid]
else:
    b_choice=a[mid:mid+20]
for b in range(b_choice):
    S=0
    for j in range(n):
        S+=abs(a[j]-b)
    ans=min(ans,S)
if ans==10**12:
    ans=0
print(ans)

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

if n==1:
    print(0)
    sys.exit()

def abs(a):
    if a<0:
        return -a
    else:
        return a

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

ans=10**12
a.sort()
if n<20:
    for b in a:
        S=0
        for j in range(n):
            S+=abs(a[j]-b)
        ans=min(ans,S)
    if ans==10**12:
        ans=0
    print(ans)
    sys.exit()

mid=n//2
if a[mid]<0:
    b_choice=a[mid-20:mid]
else:
    b_choice=a[mid:mid+20]
for b in b_choice:
    S=0
    for j in range(n):
        S+=abs(a[j]-b)
    ans=min(ans,S)
if ans==10**12:
    ans=0
print(ans)

n=int(input())

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

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

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

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 fact(n):
  if 1<n:
    return n + fact(n-1)
  else:
    return n


N = int(input())
A = list(map(int,input().split()))
b = int(round(float((sum(A)-fact(N)))/N))
if b<0:
    b -= 1

ans = 0

for i in range(N):
    ans += abs(A[i]-(b+i+1))

print(ans)

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

print(N * 2 ** (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=input()
if n%2==0:
  print(n)
else:
  print(n*2)

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

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

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 abc(N):
    if N % 2 == 0:
        return N
    else:
        return N * 2

N = 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: 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(intpu())
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(map(int, input().split()))
l_abs = []
max_v = 0
for i, a_i in enumerate(a):
    if(max_v < a_i):
        max_v = a_i
    l_abs.append(abs((i+1)-a_i))

min = 10 ** 16
if sum(l_abs) == 0:
    min = 0
else:
    for b in range(-(max_v+1), max_v+1):
        sum = 0
        for j, a_j in enumerate(a):
            sum += abs(a_j-(b+j+1))
        if(min > sum):
            min = sum
print(min)


n = int(input())
if(n%2==0):
    print(str(n))
else:
    print(str(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 statistics
import math

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

B = []
C = []
D = []
E = []
ureshimi = []
k = 0
l = 0

for i in range(N-3):
    BC = A[0 : i + 2]
    s = 0
    for j in range(k, i + 2):
        s += BC[j]
        if j == i + 1:
            k = j 
            B = BC[0 : j ]
            C = BC[j  : N - i]
            break
        elif s + BC[j + 1] > sum(BC) / 2:
            k = j
            if BC[j + 1] / 2 >= sum(BC) / 2 - s:
                B = BC[0 : j + 1]
                C = BC[j + 1 : i + 2]
            else:
                B = BC[0 : j + 2]
                C = BC[j + 2 : i + 2]
            break
    DE = A[i + 2 : N + 1]
    s = sum(DE[0:l - i + 1 ])
    for j in range(l - i + 1 , N - i - 2):
        if j == N - i - 3:
            l = j + i 
            D = DE[0 : j ]
            E = DE[j  : N - i]
            break
        elif s + DE[j ] > sum(DE) / 2:
            l = j + i
            if DE[j ] / 2 >= sum(DE) / 2 - s:
                D = DE[0 : j ]
                E = DE[j : N - i]
            else:
                D = DE[0 : j + 1]
                E = DE[j + 1 : N - i]
            break
        s += DE[j]
    ureshimi.append(max(sum(B), sum(C), sum(D), sum(E)) - min(sum(B), sum(C), sum(D), sum(E)))



print(min(ureshimi))

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*2 if N%==1 else N)

N=int(input())
print(N*2 if N%2==1 else 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):
num = int(input())
  
if num%2 != 0:
    print(str(num))
else:
    print(str(2*num))

line = input()
num = [int(n) for n in line.split()]

smaller_divisible_number = num
if num%2 != 0:
    smaller_divisible_number *= 2
print(smaller_divisible_number)

num = int(input())
  
elif num%2 != 0:
    print(str(num))
else:
    print(str(2*num))

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

Verdicts: Wrong Answer

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())
A = input().split()
for i in range(len(A)) :
    A[i] = int(A[i])
print(max(A)-min(A))

N = 10
for i in range(1,int(10e8)) :
    if (i % 2) == 0 :
        if (i % N) == 0 :
            print(i)
            break

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

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):
if a % 2 == 0:
    b = a
else:
    b = 2*a
print(b)

from statistics import *



n = int(input())
list = input().split()

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

b = int(median(list))

for i in range(n):
    list[i] = abs(list[i] - b)

print(sum(list))



a = int(input())

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

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(n**2)

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: 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())
x=0
while x%n!=0:
    x+=2

print(x)

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 numpy as np
#import pdb

N = int(input())
tmp = input().split(' ')

A = []
for i in range(N):
    A.append(int(tmp[i]))

A = np.asarray(A)

z = np.asarray([x for x in range(N)])
A = A - z

b_ceil = np.ceil(np.median(A)).astype(np.int32)
b_floor = np.floor(np.median(A)).astype(np.int32)

A_ceil = A - b_ceil
A_ceil = np.absolute(A_ceil)
A_floor = A - b_floor
A_floor = np.absolute(A_floor)

#pdb.set_trace()
print(np.min((A_ceil.sum(), A_floor.sum())).astype(np.uint32))

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

import numpy as np

N = int(input())
tmp = input().split(' ')

A = []
for i in range(N):
    A.append(int(tmp[i]))

A = np.asarray(A)
print(A.max() - A.min())

import numpy as np

N = int(input())
tmp = input().split(' ')

A = []
for i in range(N):
    A.append(int(tmp[i]))

A = np.asarray(A)

z = np.asarray([x for x in range(N)])
A = A - z

b = np.median(A)
A = A - b
A = np.abs(A)
print(A.sum().astype(np.uint8))


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

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):
n = int(input())
a = [int(_) for _ in input().split()]

sub_num = [0]*(2*10**6)

for i in range(1, n+1):
#    print(abs(int(a[i-1]-i)))
    sub_num[abs(int(a[i-1]-i))] += 1

b = -sub_num.index(max(sub_num))
#print(b)

result = 0
for i in range(1, n+1):
    result += abs(a[i-1] - (b + i))

print(result)

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())
in 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(2*N)

print(map(lambda x:x*((x%2*2),int(input()))

def median_low(A):
    A.sort()
    b=A
    n = len(A)
    if n%2==1:
        med =b[n//2]
    else:
        x=b[n//2-1]
        y=b[n//2]
        med=(x+y)/2
        if med!=int(med):
            med=x
        else:
            med=int(med)
    return med


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

A = [v-i-1 for i,v in enumerate(A)]
x = median_low(A)

print(sum(abs(v - x) for v in A))



print((lambda x:x+x*(x%2)))(int(input()))


using namespace std;

int main(){
    int n;
    cin >> n;
    if (n%2==0){
        cout<< n << endl;
    }else{
        cout << 2*n <<endl;
    }
}


print((lambda x:x+x*(x%2))(int(input())))

Verdicts: 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):
def B():
    n = int(input())
    a = input().split()
    
    if(len(a) != n):
        exit(1)

    i_max = 0
    i_min = 1000000001
    for i in a:
        k = int(i)
        if (i_max < k):
                i_max = k
        if (i_min > k):
                i_min = k
    print(i_max,i_min)
    print(abs( i_max - i_min))

if __name__ =='__main__':
    B()


if __name__ =='__main__':
    a = input()
    try:
        x = int(a)
    except:
        exit(1)

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

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 = input()
b = A.split(" ")
c = []
for i in range(0,N):
    c.append(abs(int(b[i])))

c.sort

print(int(c[-1])-int(c[0]))

N = int(input())
A = input()
b = A.split(" ")
c = []
for i in range(0,N):
    c.append(abs(int(b[i])))
c.sort

print(c[-1]-c[0])

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 sys
import itertools
import funtools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop
import math
import collections

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

import sys
import itertools
sys.setrecursionlimit(1000000000)
from heapq import heapify,heappop,heappush,heappushpop

import collections

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):
m = int(input())
a = list( map( int, input().split() ) )
b1 = a[0]
b2 = a[0]
for i in range(m):
  if a[i] > b1:
    b1 = a[i]
  elif a[i] < b2:
    b2 = a[i]
print(b1-b2)

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

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()))
B = [it - (idx + 1) for idx, it in enumerate(A)]
S = []

for b in B:
    C = [abs(i-b) for i in B]
    s = sum(C)
    S.append(s)
    
print(min(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):
from sys import stdin

N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]

for k in range(N):
    A[k] -= k

A.sort()


def get_pity_sum(x):
    pity_sum = 0
    for l in A:
        if A[x] - l >= 0:
            pity_sum += A[x] - l
        else:
            pity_sum += l - A[x]
    return pity_sum


if N % 2 == 1:
    print(min(get_pity_sum(int((N - 1) / 2)), get_pity_sum(int((N - 1) / 2 - 1)), get_pity_sum(int((N - 1) / 2 + 1))))
else:
    print(min(get_pity_sum(int(N / 2)), get_pity_sum(int(N / 2 - 1))))


from sys import stdin

N = int(stdin.readline().rstrip())

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):
s = 2
n = int(input())


def gcd(a, b):
    x = max(a, b)
    y = min(a, b)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        else:
            return z


def lcm(a, b):
    print(gcd(a, b))
    return int(a * b / gcd(a, b))


print(lcm(s, n))


s = 2
n = int(input())

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

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

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 = 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):
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):
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 = 0:
  print(N)
else print(N*2)

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

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=input()
d=a
if a>2:
else 
    b=a
    a=2
while c!=0:
    c=a%b
    a=b
    b=c
print(d*2/b)


a=input()
a=int(a)
d=a
if a<2:
    b=a
    a=2
else
    b=2
c=1
while c!=0:
    c=a%b
    a=b
    b=c
print(d*2/b)
#a=2,b=1,c=1,d=1

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

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

a=input()
a=int(a)
d=a
if a<2:
    b=a
    a=2
while c!=0:
    c=a%b
    a=b
    b=c
print(d*2/b)


a=input()
if a>2:
else 
    b=a
    a=2
while c!=0:
    c=a%b
    a=b
    b=c
print(b)
    

a=input()
a=int(a)
d=a
if a<2:
    b=a
    a=2
else
    b=2
while c!=0:
    c=a%b
    a=b
    b=c
print(d*2/b)


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

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

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

if a % 2 ==0:
  print(n)
else:
  print(n*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):
print(2*N if N%2==1 else N)

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

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

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

import math

lcm = lambda a, b: a * b // math.gcd(a, b)

lcm(2, N)

N = input()

import math

lcm = lambda a, b: a * b // math.gcd(a, b)

print(lcm(2, N))

N = int(input())

gcd = lambda a, b: gcd(b, a % b)

lcm = lambda a, b: a * b // math.gcd(a, b)

lcm(2, N)

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):
n = input()
i = 2
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(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 lcm_base(x,y):
    return (x * y) // math.gcd(x,y)

def n_lcm(*numbers):
    print(reduce(lcm_base,numbers,1))
    
n_lcm(2,int(input()))

import math

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

print(lcm_base(2,int(input())))

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())
m=max(n,2)+1
while 1:
    if m%2 and m%n:
        print(m)
    m+=1

n=int(input())
m=max(n,2)+1
while 1:
    if m%2 and m%n:
        print(m)
        break
    m+=1

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

Verdicts: 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):
a=int(input())
if a%2==0:
  print(a)
else:
  print(2a)

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

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

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 = int(input())
print(min(n, 2 *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=int(input())
num=n
while(num%n!=0 and num%2!=0):
    num+=1
print(num)

n=int(input())
num=n
if(num%n==0 and num%2==0):
    print(num)
else:
    while(num%n!=0 or num%2!=0):
        num+=n
    print(num)

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
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):
n=input()
print(n+n)

n=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: 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 else N*2)

N = int(input())
print(N if N % 2==0 else 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()))

a0=A[1:N-1]
a1n=A[0]
a2n=A[-1]
a1=A[0]
a2=A[-1]
while True:
    if a0==[]:break
    if a1n<a2n:
        a1n+=a0[0]
        a1.append(a0[0])
        a0.pop(0)
    else:
        a2n+=a0[-1]
        a2.insert(0,a0[0])
        a0.pop(-1)
        
a3n=a1[0]
a4n=a1[-1]
while True:
    if a1==[]:break
    elif a3n<a4n:
        a3n+=a1[0]
        a1.pop(0)
    else:
        a4n+=a1[-1]
        a1.pop(-1)
        
a5n=a2[0]
a6n=a2[-1]
while True:
    if a2==[]:break
    elif a5n<a6n:
        a5n+=a2[0]
        a2.pop(0)
    else:
        a6n+=a2[-1]
        a2.pop(-1)
        
num=[sum(a3),sum(a4),sum(a5),sum(a6)]
print(max(num)-min(num))

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

a0=A[1:N-1]
a1n=A[0]
a2n=A[-1]
a1=A[0]
a2=A[-1]
while True:
    if a0==[]:break
    if a1n<a2n:
        a1n+=a0[0]
        a1.append(a0[0])
        a0.pop(0)
    else:
        a2n+=a0[-1]
        a2.insert(0,a0[0])
        a0.pop(-1)
        
a3n=a1[0]
a4n=a1[-1]
while True:
    if a1==[]:break
    elif a3n<a4n:
        a3n+=a1[0]
        a1.pop(0)
    else:
        a4n+=a1[-1]
        a1.pop(-1)
        
a5n=a2[0]
a6n=a2[-1]
while True:
    if a2==[]:break
    elif a5n<a6n:
        a5n+=a2[0]
        a2.pop(0)
    else:
        a6n+=a2[-1]
        a2.pop(-1)
        
num=[sum(a3),sum(a4),sum(a5),sum(a6)]
print(max(num)-min(num))

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

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())
an = [int(i) for i in input().split()]
print(sum(an)-n)


def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
def lcm(a, b):
	return a * b // gcd (a, b)
n = int(input())
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):
a = print()
if a%2 ==0:print(a)
else:print(2*a)

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


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


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 else 2 * N)

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

Verdicts: Wrong Answer

Accepted