Problem:


Score : 100 points

Problem Statement

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

Constraints

1 \leq N \leq 10^9

All values in input are integers.

Input

Input is given from Standard Input in the following format:

N

Output

Print the minimum positive integer divisible by both 2 and N.

Sample Input 1

3

Sample Output 1

6

6 is divisible by both 2 and 3.
Also, there is no positive integer less than 6 that is divisible by both 2 and 3.
Thus, the answer is 6.

Sample Input 2

10

Sample Output 2

10

Sample Input 3

999999999

Sample Output 3

1999999998



Sample input:
3


Sample output:
6

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Multiple of 2 and N

N = int(input())

def gcd(x, y):
    if x == 0:
        return y
    else:
        return gcd(y%x, x)

print((2 * N) // gcd(2, N))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

import math

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

Submission status: Accepted

Solution code:
n=int(input())

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

Submission status: Accepted

Solution code:

N = int(input())

import fractions
#a,b=13*7*8, 52*9*11
f=fractions.gcd(2,N)
f2=2*N//f
print(f2)

Submission status: Accepted

Solution code:
# a, b = map(int, input().split())
n = int(input())
print(n<<1) if (n & 1) else print(n)

Submission status: Accepted

Solution code:
# a, b = map(int, input().split())
s = int(input())
import math
print((2*s)//math.gcd(2, s))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())
print([2*n, n][n%2==0])

Submission status: Accepted

Solution code:
n=int(input())

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

elif n%2!=0:
    print(n*2)

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import math

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

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

Submission status: Accepted

Solution code:
N = int(input())

n1 = N % 2

if n1 == 0:
    n_value = N

else:
    n_value = 2 * N

print(n_value)

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

Submission status: Accepted

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

N = i()
print(lcm(2,N))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
from math import gcd

input = sys.stdin.readline


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


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

    ans = lcm(2, N)

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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


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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
ans = 2*n

if n%2 != 0:
    print(ans)
else:
    print(min(ans,n))

Submission status: Accepted

Solution code:
import fractions

N = int(input())

print(N*2//fractions.gcd(2, N))

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions

N = int(input())

print(2*N//fractions.gcd(2, N))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())

num = a

if num % 2 != 0:
  num = num * 2

print(num)

Submission status: Accepted

Solution code:
import fractions
n = int(input())
print(int((2*n)/fractions.gcd(2, n)))

Submission status: Accepted

Solution code:
n = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
#a,b=map(int,input().split())
#l=list(map(int,input().split()))
#l=[list(map(int,input().split())) for i in range(n)]

import fractions
#gcd=fractions.gcd(2,n)#最大公約数
lcm=(2//fractions.gcd(2,n))*n #最小公倍数

print(lcm)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

r = n % 2

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

Submission status: Accepted

Solution code:
import os
import sys
from collections import defaultdict, Counter
from itertools import product, permutations,combinations, accumulate
from operator import itemgetter
from bisect import bisect_left,bisect
from heapq import heappop,heappush,heapify
from math import ceil, floor, sqrt
from copy import deepcopy
from fractions import gcd

def main():
    num = int(input())
    ans = 2 * num / gcd(2,num)
    print(int(ans))

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
N=int(input())

if N==1:
  print(2)
elif N%2==0 and N>1:
  print(N)
else:
  print(2*N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def actual(n):
    if n % 2 == 0:
        return n

    return 2 * n

n = int(input())
print(actual(n))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n_str = input()
n = int(n_str)

if n % 2 == 0 :
    print(n)
elif n % 2 == 1 :
    print(n*2)

Submission status: Accepted

Solution code:
# input
N = int(input())

# check
a = N
while a % 2 != 0:
    a += N
else:
    print(a)

Submission status: Accepted

Solution code:
import fractions
N = int(input())
def lcm(A, B):
    return int((A * B) / fractions.gcd(A, B))
print(lcm(2, N))

Submission status: Accepted

Solution code:
N=int(input())

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import sys

def solve():
    input = sys.stdin.readline
    N = int(input())
    print(N if N % 2 == 0 else 2 * N)

    return  0

if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    n = int(input())
    #a = list( map( int, input().split()))
    if n % 2 == 0:
        print(n)
    else:
        print(n*2)
    
if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())
ans = n
while(1):
  if ans%2==0 and ans%n==0:
    break
  ans += n
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
import fractions
n=int(input())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(2, n))

Submission status: Accepted

Solution code:
N = (int)(input())
ans=N
while 1:
    if ans%2==0:
        print(ans)
        exit()
    ans+=N

Submission status: Accepted

Solution code:
def resolve():
    N = int(input())
    print(N if N%2 == 0 else N*2)
resolve()

Submission status: Accepted

Solution code:
n = int(input())
import fractions
print(2*n//fractions.gcd(2,n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n=int(input())

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

else:
    print(n)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

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

Submission status: Accepted

Solution code:
from fractions import gcd
n = int(input())
print(2 * n // gcd(2, n))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def gcd(a, b):
	"""Compute the greatest common divisor of a and b"""
	while b > 0:
		a, b = b, a % b
	return a

def lcm(a, b):
	"""Compute the lowest common multiple of a and b"""
	return a * b // gcd(a, b)

def resolve():
	n = int(input())
	print(lcm(n, 2))
resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
import sys

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = int(input()) 
print(n) if n % 2 == 0 else print(n * 2)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
n = int(input())
print(2*n//fractions.gcd(2,n))

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18
# ----------------------------------------------------------- #

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
n = int(input())
print(2*n//gcd(2,n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:
from math import gcd
n=int(input())
print(2*n//gcd(n,2))

Submission status: Accepted

Solution code:

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

def resolve():
    import fractions
    n=int(input())
    print(n * 2 // fractions.gcd(n, 2))
resolve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Wed May 13 17:07:20 2020

@author: shinba
"""

n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def ABC_102_A():
    N = int(input())

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

if __name__ == '__main__':

    ABC_102_A()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
A = int(input())
if A % 2 == 0:
    print(A)
else:
    print(2*A)

Submission status: Accepted

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

import sys
# import math
# from string import ascii_lowercase, ascii_upper_case, ascii_letters, digits, hexdigits
# import re                                    # re.compile(pattern) => ptn obj; p.search(s), p.match(s), p.finditer(s) => match obj; p.sub(after, s)
# from operator import itemgetter              # itemgetter(1), itemgetter('key')
# from collections import deque                # deque class. deque(L): dq.append(x), dq.appendleft(x), dq.pop(), dq.popleft(), dq.rotate()
# from collections import defaultdict          # subclass of dict. defaultdict(facroty)
# from collections import Counter              # subclass of dict. Counter(iter): c.elements(), c.most_common(n), c.subtract(iter)
# from heapq import heapify, heappush, heappop # built-in list. heapify(L) changes list in-place to min-heap in O(n), heappush(heapL, x) and heappop(heapL) in O(lgn).
# from heapq import nlargest, nsmallest        # nlargest(n, iter[, key]) returns k-largest-list in O(n+klgn).
# from itertools import count, cycle, repeat   # count(start[,step]), cycle(iter), repeat(elm[,n])
# from itertools import groupby                # [(k, list(g)) for k, g in groupby('000112')] returns [('0',['0','0','0']), ('1',['1','1']), ('2',['2'])]
# from itertools import starmap                # starmap(pow, [[2,5], [3,2]]) returns [32, 9]
# from itertools import product, permutations  # product(iter, repeat=n), permutations(iter[,r])
# from itertools import combinations, combinations_with_replacement
# from itertools import accumulate             # accumulate(iter[, f])
# from functools import reduce                 # reduce(f, iter[, init])
# from functools import lru_cache              # @lrucache ...arguments of functions should be able to be keys of dict (e.g. list is not allowed)
# from bisect import bisect_left, bisect_right # bisect_left(a, x, lo=0, hi=len(a)) returns i such that all(val<x for val in a[lo:i]) and all(val>-=x for val in a[i:hi]).
# from copy import deepcopy                    # to copy multi-dimentional matrix without reference
# from fractions import gcd                    # for Python 3.4 (previous contest @AtCoder)


def main():
    mod = 1000000007                # 10^9+7
    inf = float('inf')              # sys.float_info.max = 1.79...e+308
    # inf = 2 ** 64 - 1               # (for fast JIT compile in PyPy) 1.84...e+19
    sys.setrecursionlimit(10**6)    # 1000 -> 1000000
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    print(2 * n) if n % 2 == 1 else print(n)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
if max(2,n)%2==0:
    print(max(2,n))
else:
    print(2*n)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
m = max(2, n)
for i in range(m, 2*n+1, m):
    if i % 2 == 0:
        print(i)
        exit(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())

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

Submission status: Accepted

Solution code:
from fractions import gcd

n=int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
#template
N = int(input())
if N % 2 == 0:
    print(N)
else:
    print(2*N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd
def lcm(a, b):
    return (a*b) // gcd(a, b) 
n = int(input())
print(lcm(2, n))

Submission status: Accepted

Solution code:
def gcd(m, n):
    x, y = max(m, n), min(m, n)
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x, y = y, z
        else:
            return z


def lcm(m, n):
    return int(m * n / gcd(m, n))


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

Submission status: Accepted

Solution code:
# ABC102A

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
n = input()
if int(n) % 2 == 0:
    ans = int(n)
else:
    ans = int(n) * 2
print(ans)

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
n = int(input())
print(int(2*n / fractions.gcd(2,n)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
while n <= (10**24):
  if (n % 2) == 0:
    print(n)
    break
  n += n

Submission status: Accepted

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


def solve(N: int):
    print(N * 2 if N % 2 else N)


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    solve(N)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import fractions
a = int(input())
print((a * 2 ) // fractions.gcd(a, 2))

Submission status: Accepted

Solution code:
N = int(input())


def gcd(a, b):
    x = max(a, b)
    y = min(a, b)
    mod = x % y
    if mod == 0:
        return y

    return gcd(y, mod)


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


print(lcm(2, N))

Submission status: Accepted

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

#最大公約数
def gcd(a,N):
    while N!=0:
        a,N = N, a%N
    return a
##2つの整数a,bに対し，最大公約数g,最小公倍数lとおくと，
##ab=gl
print(int(a*N/gcd(a,N)))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
input=lambda: sys.stdin.readline().rstrip()
YesNo=lambda b: bool([print('Yes')] if b else print('No'))
YESNO=lambda b: bool([print('YES')] if b else print('NO'))
int1=lambda x:int(x)-1

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    if N % 2 == 0:
        print(N)
    else:
        print(2*N)
if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
## io
IS = lambda: sys.stdin.readline().rstrip()
II = lambda: int(IS())
MII = lambda: list(map(int, IS().split()))
MIIZ = lambda: list(map(lambda x: x-1, MII()))
## dp
INIT_VAL = 0
DP2 = lambda d1, d2: [[INIT_VAL]*d2 for _ in range(d1)]
DP3 = lambda d1, d2, d3: [[[INIT_VAL]*d3 for _ in range(d2)] for _ in range(d1)]
## math
DIVC = lambda x, y: -(-x//y)
DIVF = lambda x, y: x//y

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions

N = int(input())

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import fractions
n=int(input())
print((2*n)//fractions.gcd(2,n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

def main():
    N = int(input())
    answer = N if not N % 2 else N * 2
    print(answer)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def euclid(a, b):
    if b == 0:
        return a
    else:
        return euclid(b, a%b)

def multiple(a, b):
    return a*b // euclid(a, b)

N = int(input())

print(multiple(N,2))

Submission status: Accepted

Solution code:
a = int(input())
print(2 * a if a & 1 else a)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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