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:
import math, sys
from bisect import bisect_left, bisect_right
from collections import Counter, defaultdict, deque
from copy import deepcopy
from functools import lru_cache
from heapq import heapify, heappop, heappush
from itertools import accumulate, combinations, permutations
input = sys.stdin.readline
mod = 10**9 + 7
ns = lambda: input().strip()
ni = lambda: int(input().strip())
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:
icase=0
if icase==0:
    n=int(input())
    if n%2==0:
        print(n)
    else:
        print(2*n)

Submission status: Accepted

Solution code:
import fractions

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

Submission status: Accepted

Solution code:
import math
import collections
import sys

#input = sys.stdin.readline
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]

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

def lcm(a, b):
    return a // gcd(a, b) * b
n=I()
ans=lcm(2,n)
print(ans)

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:
a = int(input())
if a % 2 == 1: a *= 2
print(a)
# Source code should be longer than 50 characters

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

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

Submission status: Accepted

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

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())
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(2, N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())

def ans(N):
    if N%2 == 0:
        return N
    else:
        return N*2
        
print(ans(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 gcd(a, b):
    while b:
        a, b = b, a % b
    return a

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

N = int(input())
print(lcm(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:
from fractions import gcd
n = int(input())
print(n * 2 // 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())
c=n
d=0
for i in range(n, 99999999999999, n):
    if i%2==0 and i%c==0:
        print(i)
        break

Submission status: Accepted

Solution code:
a = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
def getmdc(x, y):
    while(y):
        x, y = y, x % y
    return x
def mmc2(x):
    return x * 2 // getmdc(x, 2)
print(mmc2(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
iterator = n
while True:
    if iterator % n == 0 and iterator % 2 == 0:
        print(iterator)
        break
    else:
        iterator += n

Submission status: Accepted

Solution code:
x = int(input())

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

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

Submission status: Accepted

Solution code:
N = int(input())

if N == 1 or N == 2:
    print(2)
else:
    if N % 2 == 0:
        i = N
    else:
        i = N*2
    while i % N != 0:
        i += 2
    print(i)

Submission status: Accepted

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

Submission status: Accepted

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

if '__main__' == __name__:
    resolve()

Submission status: Accepted

Solution code:
def q1():
    N = int(input())
    d, m = divmod(N,2)
    if m==0:
        ans = N
    else:
        ans = N * 2
    print(ans)


if __name__ == '__main__':
    q1()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
if n & 1:
    print(n * 2)
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:
#!python3

# input
N = int(input())


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


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

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

Submission status: Accepted

Solution code:
# ABC 102: A – Multiple of 2 and N
n = int(input())
print(n if n % 2 == 0 else n * 2)

Submission status: Accepted

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

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

n = I()
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:
#最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a

#最大公約数の個数
def ngcd(a):
    res = a[0]
    for i in range(len(a)):
        if res != 1:
            res = gcd(a[i], res)
    return res

#最小公倍数
def lcm(a,b):
    return a * b // gcd(a, b)

#最小公倍数の個数
def nlcm(a):
    res = a[0]
    for i in range(len(a)):
        res = lcm(res, a[i])
    return res

n = int(input())
print(lcm(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:
import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
  
n=int(input())
print(lcm(2,n))

Submission status: Accepted

Solution code:
import itertools
import fractions
def main():
  n = int(input())
  a = fractions.gcd(2,n)#gcd = 最大公約数
  lcm = 2 * n//a#lcm 最小公倍数
  print(lcm)
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:
def koubaisu(N,M):
    NM = N*M
    if M>N:
        N,M = M,N
    while(N%M!=0):
        Temp = N
        N = M
        M = Temp%M
    return NM//M
N = int(input())
print(koubaisu(N,2))

Submission status: Accepted

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

print(N)

Submission status: Accepted

Solution code:
import sys

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

def main():
    ans = n
    if n & 1: ans *= 2
    print(ans)

if __name__ ==  '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    if a[0] %2 ==0:
        print(a[0])
    else:
        print(a[0]*2)

Submission status: Accepted

Solution code:
def Multiple(n):

    return n if n % 2 == 0 else n * 2

def main():
    n = int(input())
    print(Multiple(n))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
# print(N)
if N % 2 == 0:
    print(N)
else:
    print(N * 2)

Submission status: Accepted

Solution code:
#どっちで出すか注意, rstrip注意
#提出前に見返すこと！
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    #from collections import defaultdict
    from itertools import combinations, permutations, accumulate
    #from itertools import product
    from bisect import bisect_left,bisect_right
    import heapq
    from math import floor, ceil
    #from operator import itemgetter

    #inf = 10**17
    #mod = 10**9 + 7

    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 :
  print(n*2)
else:
  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:
import fractions
n = int(input())

ans = 2 * n // fractions.gcd(2, n)
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:
import fractions
a = int(input())
num = fractions.gcd(2,a)
print(a*2//num)

Submission status: Accepted

Solution code:
N=int(input())
if N%2==0 and N>=2:
    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:


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

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


# Solve
if __name__ == "__main__":
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

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());print(N%2*N*2 or N)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# 最大公約数
def gcd(a, b):
    while b != 0:
        a, b = b, a % b
    return a


# 最小公倍数
def lcm(a, b):
    return a * b // gcd(a, b)


N = int(input())
print(lcm(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:
import sys
def input(): return sys.stdin.readline().rstrip()

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
import os


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

    N = int(sys.stdin.buffer.readline().rstrip())
    print(N if N%2 == 0 else N*2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
N = int(input())

if N%2:
    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:
#abc102 a 
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(N*2)

Submission status: Accepted

Solution code:
# Author: cr4zjh0bp
# Created: Thu Mar 12 07:37:08 UTC 2020
import sys
 
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni = lambda: int(ns())
nin = lambda y: [ni() for _ in range(y)]
na = lambda: list(map(int, stdin.readline().split()))
nan = lambda y: [na() for _ in range(y)]
nf = lambda: float(ns())
nfn = lambda y: [nf() for _ in range(y)]
nfa = lambda: list(map(float, stdin.readline().split()))
nfan = lambda y: [nfa() for _ in range(y)]
ns = lambda: stdin.readline().rstrip()
nsn = lambda y: [ns() for _ in range(y)]
ncl = lambda y: [list(ns()) for _ in range(y)]
nas = lambda: stdin.readline().split()

def gcd(m, n):
    if n == 0:
        return m
    else:
        return gcd(n, m % n)

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

N = ni()
print(lcm(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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# A - Multiple of 2 and N
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(int(N))
else:
  print(int(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 bisect
# from collections import Counter, defaultdict, deque
# import copy
# from heapq import heappush, heappop, heapify
# from fractions import gcd
# import itertools
# from operator import attrgetter, itemgetter
# import math

import sys

# import numpy as np

ipti = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)

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

Submission status: Accepted

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

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
  
N = int(input())

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:
# coding: utf-8
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:
n = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
s = int(input())
if s % 2 == 0:
    print(int(s))
else:
    print(int(s*2))

Submission status: Accepted

Solution code:
import fractions

n = int(input())


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

Submission status: Accepted

Solution code:
n = int(input())

#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)

print(lcm(2, n))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

N = int(input().strip())

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:
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a%b)

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


if n % 2:
  print(n*2)
else:
  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:
def gcd(a, b):   # Greatest Common Divisor
    if b == 0:
        return a
    else:
        return gcd(b, a%b)
    
def lcm(a, b):   # Least Common Multiple
    return a*b // gcd(a, b)

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

Submission status: Accepted

Solution code:
from fractions import gcd

N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import fractions

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

Submission status: Accepted

Solution code:
def gcd(x, y):
    while y != 0:
        x, y = y, x % y
    return x


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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

def lcm(x, y):
    if x < y:
        z = x
        x = y
        y = z
    return x / gcd(x, y) * y

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from fractions import gcd

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

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 * 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())
#最大公約数
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a

#最小公倍数
def lcm(a,b):
    return a*b//gcd(a,b)

print(lcm(2,N))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-


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


if __name__ == "__main__":
    main()

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

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

Submission status: Accepted

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

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

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:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline().split()[0])
print(2*n if n % 2 else n)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 24, Jan, 2020
"""

import sys

# import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from fractions import gcd

n = int(input().strip())
print((2 * n) // 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())
print(N * (N % 2 + 1))

Submission status: Accepted

Solution code:

# gcdは最大公約数
from fractions import gcd
# lcmは最小公倍数
def lcm(x, y):
    return (x * y) // gcd(x, y)

def main():
    from sys import stdin, setrecursionlimit
    setrecursionlimit(10**6)
    r = stdin.readline()[:-1]
    #n = int(stdin.readline()[:-1])   
    #r = [stdin.readline() for i in range(n)]
    #t = [int(stdin.readline()) for i in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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())
ans = lcm(2, N)
print(ans)

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import random
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

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

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

n = int(sys.stdin.buffer.readline())
if n & 1:
    print(n * 2)
else:
    print(n)

Submission status: Accepted

Solution code:
import math
import queue
import bisect
import heapq
import time
import itertools

mod = int(1e9+7)

def swap(a,b):
    return (b,a)

def my_round(a,dig=0):
    p = 10 ** dig
    return (a * p * 2 + 1) // 2 / p

def gcd(a,b): #最大公約数
    if (a<b):
        a,b = swap(a,b)
    if (b==0):
        return a
    else:
        return gcd(b,a%b)

def lcm(a,b): #最小公倍数
    return a/gcd(a,b)*b

def divisors(a): # 約数列挙
    divisors = []
    for i in range(1,int(a**0.5)+1):
        if a%i==0:
            divisors.append(i)
            if i!=a//i:
                divisors.append(a//i)
    return divisors

def is_prime(a): #素数判定
    if a<2:
        return False
    elif a==2:
        return True
    elif a%2==0:
        return False
    sqrt_num = int(a**0.5)
    for i in range(3,sqrt_num+1,2):
        if a%i==0:
            return False
    return True

def prime_num(a): #素数列挙
    pn = [2]
    for i in range(3,int(a**0.5),2):
        prime = True
        for j in pn:
            if i%j==0:
                prime = False
                break
        if prime:
            pn.append(i)
    return pn

def prime_fact(a): #素因数分解
    sqrt = math.sqrt(a)
    res = []
    i = 2
    if is_prime(a):
        res.append(a)
    else:
        while a!=1:
            while a%i==0:
                res.append(i)
                a //= i
            i += 1
    return res

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

if __name__=='__main__':
    main()

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

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