Problem:


Score : 200 points

Problem Statement

Takahashi loves numbers divisible by 2.

You are given a positive integer N. Among the integers between 1 and N (inclusive), find the one that can be divisible by 2 for the most number of times. The solution is always unique.

Here, the number of times an integer can be divisible by 2, is how many times the integer can be divided by 2 without remainder.

For example,

6 can be divided by 2 once: 6 -> 3.

8 can be divided by 2 three times: 8 -> 4 -> 2 -> 1.

3 can be divided by 2 zero times.

Constraints

1 ≤ N ≤ 100

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer.

Sample Input 1

7

Sample Output 1

4

4 can be divided by 2 twice, which is the most number of times among 1, 2, ..., 7.

Sample Input 2

32

Sample Output 2

32

Sample Input 3

1

Sample Output 3

1

Sample Input 4

100

Sample Output 4

64



Sample input:
7


Sample output:
4

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 1
hantei = 1

while hantei == 1:
    ans = ans * 2
    if ans >= N:
        hantei = 0

ans = int(ans/2)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
while N > ans:
  ans = ans *2
print(ans/2)

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt = 0
for i in range(6):
  n = n/2
  if n//2 ==0:
    cnt +=1
print(2**cnt)

Submission status: Wrong Answer

Solution code:
n = int(input())
if n>=64:
  print("64")
elif 64>n>=32:
  print("43")
elif 32>n>=16:
  print("16")
elif 16>n>=8:
  print("8")
elif 8>n>=4:
  print("4")
elif 4>n>=2:
  print("2")
else:
  print("1")

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(8):
  if N < 2**i:
    print(2**(i-1))

Submission status: Wrong Answer

Solution code:
# -*- coding: utf-8 -*-
import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 
# NO, PAY-PAY
#import numpy as np
#import statistics
#from statistics import mean, median,variance,stdev
 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    N = inputInt()
    
    ans = 0
    ansans = 0
    for i in range(1, N+1):
        tmp = 0
        han = i
        aaa = i
        while True:
            if han % 2 == 0:
                han = han / 2
                tmp += 1
            else:
                break
        if tmp > ans:
            ans = tmp
            ansans = aaa
            
    print(ansans)
    
if __name__ == "__main__":
	main()

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
    print(0)
elif N < 4:
    print(2)
elif N < 8:
    print(4)
elif N < 16:
    print(8)
elif N < 32:
    print(16)
elif N < 64:
    print(32)
else:
    print(64)

Submission status: Wrong Answer

Solution code:
N = int(input())
cut = 0
lis = [ a for a in range(1, N+1)]
while True:
  li_yojo = [ a % 2 for a in lis]
  if li_yojo.count(0) == 1:
    break
  else:
    lis = [ a / 2 for a in lis]
    cut += 1
        
print(2 ** (cut))

Submission status: Wrong Answer

Solution code:
N = int(input())
cut = 0
lis = [ a for a in range(1, N+1)]
while True:
  li_yojo = [ a % 2 for a in lis]
  if li_yojo.count(0) == 1:
    break
  else:
    lis = [ a / 2 for a in lis]
    cut += 1
        
print(2 ** (cut+1))

Submission status: Wrong Answer

Solution code:
n = int(input())
a = list(range(1, (n+1)))
ans = [0]*n

for num in a:
  tmp = num
  count = 0
  while num % 2 == 0:
    count += 1
    ans[(tmp-1)] = count
    num = int(num/2)
  
print(max(ans))

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
while n % 2 == 0 :
  count += 1
  n = int(n/2)
  
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 0
while 2**ans <N:
  ans += 1
print(2**(ans-1))

Submission status: Wrong Answer

Solution code:
N = int(input())
a = [N]
ans = 0
for num in a:
  while num % 2 == 0:
    num /= 2
    ans += 1
    
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

alist = [2 ** i  for i in range(1, 10) if 2 ** i <= 100]

for i in range(n, 0, -1):
    if i == 1:
        print(1)
    elif  i in alist:
        print(i)

Submission status: Wrong Answer

Solution code:
n=int(input())
ans_max=0
ans_num=0
for i in range(n):
    num=i+1
    num_now=i+1
    #print(num)
    ans = 0
    while(num%2==0):
        num=num/2
        ans = ans+1
    if(ans>ans_max):
        ans_max=ans
        ans_num=num_now
        #print('ansmax',ans_max)
        #print('ansmax',ans_num)

print(ans_num)

Submission status: Wrong Answer

Solution code:
N = int(input())
kata = 0
constant = 2
while constant**kata <= N:
  kata += 1
print(constant**kata/2)

Submission status: Wrong Answer

Solution code:
N = int(input())
s = -1
c = 1
while c < N:
  s+=1
  c**s
print(s)

Submission status: Wrong Answer

Solution code:
N=int(input())
n=0
while N>2**n:
  n+=1
print(2**(n-1))

Submission status: Wrong Answer

Solution code:
N=int(input())
n=0
while N>2**n:
  n+=1
print(n)

Submission status: Wrong Answer

Solution code:
class Get_set_num:
	def __init__(self):
		self.num = int()
		 
	def set_num(self,num):
		self.num = num

	def get_num(self):
		return self.num

		 
do  = Get_set_num()
Inp = input()
Inp = int(Inp)


#割れる回数が最大の数とその回数を記録するリスト
#max[0]が対象となる数、max[1]が割れた回数
max_list = [1,0]

for i in range(Inp , 1 , -1):
	count=0
	do.set_num(i)
	while i % 2 == 0:
		i= i/2
		if i % 2 == 0:
			count += 1
		if count > max_list[1]:
			max_list.clear()
			max_list.extend([do.get_num(),count])
			
print(max_list[0])

Submission status: Wrong Answer

Solution code:
a = 0
ans = 0
N = int(input())
for i in range(1, N+1) :
  p = 0
  x = i
  while x % 2 == 0 :
    x //= 2
    p += 1
  if a < p :
    a = p
    ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
a = 0
ans = 0
N = int(input())
for i in range(1, N) :
  p = 0
  while i % 2 == 0 :
    i //= 2
    p += 1
  if a < p :
    a = p
    ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input());x=2
while 1:
    if x**2>n:
        print(x)
        break
    else:
        x=x**2

Submission status: Wrong Answer

Solution code:
import sys

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

n = 1

while n <= N:
  n = n * 2

print(n/2)

Submission status: Wrong Answer

Solution code:
N = int(input())

answer = 1
while answer*2 <= N:
  answer *= 2
  print(answer)
print(answer)

Submission status: Wrong Answer

Solution code:
A = int(input())
list=[]
for i in range(0, A+1 , 2):
    list.append(i)
print(list[-1])

Submission status: Wrong Answer

Solution code:
N = int(input())
num = N
hakai = 0
for i in range(8):
  if N%2 == 0:
    N = N//2
    hakai += 1
  else:
    break
print(hakai)

Submission status: Wrong Answer

Solution code:
n = int(input())

ans = 0

for i in range(6,0,-1):
  if n >= 2**i:
    ans = 2**i
    break
print(ans)

Submission status: Wrong Answer

Solution code:
def count(i):
    cnt = 0
    switch = 1
    while switch:
        if i % 2 == 1:
            return cnt
        else:
            cnt += 1
            i = i / 2

n = int(input())
correct_num = 0
split_cnt = 0
for i in range(n):
    m = count(i + 1)
    if m > split_cnt:
        correct_num = i + 1
        split_cnt = m
print(correct_num)

Submission status: Wrong Answer

Solution code:
n = int(input())
split_num = 0
flag = 0
while flag == 0:
    if n % 2 == 1:
        flag += 1
        break
    else:
        split_num += 1
        n = n / 2
print(split_num)

Submission status: Wrong Answer

Solution code:
N = int(input())

max_div_cnt = 0
result = 0
for n in range(N):
  tmp = n + 1
  div_cnt = 0
  while tmp > 0:
    if tmp % 2 == 0:
      div_cnt += 1
      tmp //= 2
    else:
      break
  if div_cnt > max_div_cnt:
    max_div_cnt = div_cnt
    result = n + 1
print(result)

Submission status: Wrong Answer

Solution code:
N = int(input())

max_div_cnt = 0
result = 0
for n in range(N):
  tmp = n
  div_cnt = 0
  while tmp > 0:
    if tmp % 2 == 0:
      div_cnt += 1
      tmp //= 2
    else:
      break
  if div_cnt > max_div_cnt:
    max_div_cnt = div_cnt
    result = n
print(result)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

ans = (math.floor(N**0.5))**2
print(ans)

Submission status: Wrong Answer

Solution code:
import math

N = int(input())

ans = math.floor(N**0.5)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
A = int(1)
for i in range(N):
    if N > 2**i :
        A = 2**i

print(A)

Submission status: Wrong Answer

Solution code:
intInp = int(input())
flag = True
maxValue = 0
tmp = 0
for i in range(1,intInp+1):
    # print("i is {}".format(i))
    tmpAns = i
    counter = 0
    while(True):
        if i % 2 == 0:
            # counter shows the number of division
            counter += 1
            # print("counter is {}".format(counter))
            i /= 2
        else:
            # if counter is lager than tmp, then the value i is more disivible than stored maxValue
            if(counter > tmp):
                # print("counter is {0}, tmp is {1}".format(counter,tmp))
                # print("i is {}".format(i))
                maxValue = tmpAns
                tmp = counter
            break
    # print("tmp is {}".format(tmp))
print(maxValue)

Submission status: Wrong Answer

Solution code:
n=int(input())

k=0
m=n

while m%2==0:
  k+=1
  m=m/2
  
print(k)

Submission status: Wrong Answer

Solution code:
N=int(input())

ans=0
max=0
cnt=0

for i in range(N):
    n = i+1
    cnt=0
    while(n%2==0):
        cnt+=1
        n=n//2
    if cnt>max:
        max=cnt
        ans=i+1
        
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

result = 0
max_c = 0
for i in range(1, n + 1):
    tmp = i
    count = 0
    while tmp > 0 and tmp % 2 == 0:
        tmp = int(tmp / 2)
        count += 1
    if max_c < count:
        max_c = count
        result = i

print(result)

Submission status: Wrong Answer

Solution code:
n=int(input())
a=2
i=1
while(a>n):
    a=a**i
    i=i+1
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())

ans = 1
while ans * 2 <N:
    ans *= 2

print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())

tmp = 0
cnt = 0
ans = 0

for i in range(1,n+1):
    s = i
    cnt = 0
    while True:
        if s % 2 == 0:
            cnt += 1
            s /= 2
        else:
            break
    if tmp < cnt:
        tmp = cnt
        ans = i

print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

# 最大回数
c=0

# 最大回数時の整数
a=0

for x in range(1,N+1):
  _c=0
  _x=x
  while True:
    if _x%2==0:
      _x//=2
      _c+=1
    else:
      if c<_c:
        c=_c
        a=x
      break

# 出力
print(a)

Submission status: Wrong Answer

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

# 最大回数
c=0

for x in range(1,N+1):
  _c=0
  while True:
    if x%2==0:
      x//=2
      _c+=1
    else:
      c=max(c,_c)
      break

# 出力
print(c)

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1,n):
    if n == 2 ** i:
        print(2 ** i)
        break
    elif n < 2 ** i:
        print(2 ** (i - 1))
        break

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(1,n):
    if n == 2 ** i:
        print(2 ** i)
        break
    if n < 2 ** i:
        print(2 ** (i - 1))
        break

Submission status: Wrong Answer

Solution code:
n = int(input())
power_2 = [2**i for i in range(1, 8)]
for i, power in enumerate(power_2):
  if n < power:
    print(power_2[i-1])
    break

Submission status: Wrong Answer

Solution code:
from math import log2;print(int(log2(int(input())))**2)

Submission status: Wrong Answer

Solution code:
N = int(input())
i = 0
while 2**i < N:
  i += 1
  
print(2**(i-1))

Submission status: Wrong Answer

Solution code:
n=int(input())

if 1<=n<4:
    print("1")
elif 4<=n<8:
    print("4")
elif 8<=n<16:
    print("8")
elif 16<=n<32:
    print("16")
elif 32<=n<64:
    print("32")
elif 64<=n:
    print("64")

Submission status: Wrong Answer

Solution code:
n = int(input())
cnt=1
while True:
    if 2**cnt < n:
        cnt += 1
    else:
        print(2**(cnt-1))
        break

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = [1, 2, 4, 8, 16, 32, 64]

max([i for i in ans if n-i >= 0])

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = [0, 1, 2, 4, 8, 16, 32, 64]

max([i for i in ans if n-i >= 0])

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc068/tasks/abc068_b

import itertools
from collections import Counter
from collections import defaultdict
import bisect

def main():
    N = int(input())
    ans = 0
    count = 0
    for i in range(1, N+1):
        c = 0
        v = i
        while v % 2 == 0:
            c += 1
            v //= 2
        if c > count:
            count = c
            ans = i

    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
# https://atcoder.jp/contests/abc068/tasks/abc068_b

import itertools
from collections import Counter
from collections import defaultdict
import bisect

def main():
    N = int(input())
    ans = 0
    while N % 2 == 0:
        ans += 1
        N //= 2
    print(ans)


if __name__ == '__main__':
    main()

Submission status: Wrong Answer

Solution code:
import math
N = int(input())
print(pow(math.floor(math.sqrt(N)),2))

Submission status: Wrong Answer

Solution code:
N = int(input())

ans, Max = 0, 0
for i in range(1, N+1):
    ct = 0
    tmp = i
    while tmp % 2 == 0:
        tmp //= 2
        ct += 1
    if ct > Max:
        Max = ct
        ans = i

print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
check = 0
ans = 1
for i in range(1, N+1):
    cnt = 0
    while i%2 == 0:
        cnt += 1
        i //= 2
    if cnt > check:
        ans = i
        check = cnt

print(ans)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n = int(input())
    i = 1
    while i * 2 < n:
        i *= 2
    print(i)

Submission status: Wrong Answer

Solution code:
if __name__ == '__main__':
    n = int()
    i = 1
    while i * 2 < n:
        i *= 2
    print(i)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
num = 1
for i in range(1, N + 1):
    now = i
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    if cnt > ans:
        ans = cnt
        num = now

print(now)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
num = 0
for i in range(1, N + 1):
    now = i
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    if cnt > ans:
        ans = cnt
        num = now

print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
num = 0
for i in range(1, N + 1):
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    if cnt > ans:
        ans = cnt
        num = i
print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(1, N + 1):
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    ans = max(ans, cnt)
print(int(ans))

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(1, N + 1):
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    ans = max(ans, cnt)
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(1, N + 1):
    cnt = 0
    while i % 2 == 0:
        i /= 2
        cnt += 1
    ans = max(ans, cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(7, 0, -1):
	if 2**i < N:
		print(2 ** i)
		break
else:
	print(N)

Submission status: Wrong Answer

Solution code:
N = int(input())
num = 1
 
while num*2 < N:
  num *= 2
 
print(num)

Submission status: Wrong Answer

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

while num < N:
  num *= 2

print(num)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
while True:
    ans *= 2
    if N < ans:
        print(ans/2)
        break
    elif N == ans:
        print(ans)
        break

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 1
while ans < N:
    ans *= 2
print(ans/2)

Submission status: Wrong Answer

Solution code:
N=int(input())
ans=1
while ans<N:
  ans*=2
print(ans//2)

Submission status: Wrong Answer

Solution code:
from math import *;print(floor(log2(int(input()))))

Submission status: Wrong Answer

Solution code:
n = int(input())
ans = [0] * (n + 1)
for i in range(1, n + 1):
  j = i
  while (j % 2 == 0):
    ans[i] += 1
    j /= 2
print(ans.index(max(ans)))

Submission status: Wrong Answer

Solution code:
N = int(input())
for i in range(7):
	if 2**i>N:
		print(2**(i-1))
		break

Submission status: Wrong Answer

Solution code:
a = int(input())
max_count = 0
max_number = 0

for i in range(1,a+1):
    count = 0
    hold = i
    while i%2 == 0:
        count += 1
        i //= 2
    if count > max_count:
        max_count = count
        max_number = hold
        
print(max_number)

Submission status: Wrong Answer

Solution code:
N = int(input())

for i in range(7):
  if 2**i <= N < 2**(i+1):
    print(i)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
ans = 1
for i in range(1,N+1):
    tmp_count = 0
    tmp_i = i
    while(tmp_i%2==0):
        tmp_count+=1
        tmp_i /= 2
    print(i, tmp_count)
    if count < tmp_count:
        count = tmp_count
        ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
count = 0
ans = 1
for i in range(1,N):
    tmp_count = 0
    tmp_i = i
    while(tmp_i%2==0):
        tmp_count+=1
        tmp_i /= 2
    print(i, tmp_count)
    if count < tmp_count:
        count = tmp_count
        ans = i
print(ans)

Submission status: Wrong Answer

Solution code:
import sys

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

if N in [1, 2, 4, 8, 16, 32, 64]:
    print(N)
else:
    sorted_list = [1, 2, 4, 8, 16, 32, 64, N][::-1]
    min_index = sorted_list[sorted_list.index(N) - 1]
    print(min_index)

Submission status: Wrong Answer

Solution code:
import sys

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

if N in [1, 2, 4, 8, 16, 32, 64]:
    print(N)
else:
    sorted_list = [1, 2, 4, 8, 16, 32, 64, N][::-1]
    min_index = sorted_list[sorted_list.index(N) + 1]
    print(min_index)

Submission status: Wrong Answer

Solution code:
import sys

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

for i in reversed(range(2, 7, 2)):
    if pow(2, i) < N:
        print(pow(2, i))
        exit()

Submission status: Wrong Answer

Solution code:
N = int(input())

cnt = 0


def dev(x):
    global cnt
    if x % 2 == 0:
        cnt += 1
        dev(x / 2)
    return cnt


min_cnt = 0
for i in range(2, N, 2):
    min_cnt = max(dev(i), min_cnt)
print(min_cnt)

Submission status: Wrong Answer

Solution code:
N = int(input())

mx = 0
for _ in range(N):
    if _%2 == 1:
        continue
    num = 2**_
    if num <= N and mx < num:
        mx = num
print(mx)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 1
elm = 1
for _ in range(1,N+1):
    if _ == 0:
        break
    if _%2 == 1:
        continue
    i = 0
    n = _
    while True:
        if n%2 == 1:
            break
        n = n/2
        i += 1
    if count < i:
        count = i
        elm = _

print(0 if N == 0 else elm)

Submission status: Wrong Answer

Solution code:
N = int(input())

count = 1
elm = 1
for _ in range(1,N+1):
    if _%2 == 1:
        continue
    i = 0
    n = _
    while True:
        if n%2 == 1:
            break
        n = n/2
        i += 1
    if count < i:
        count = i
        elm = _

print(elm)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
for i in range(N):
  a = i
  cnt = 0
  while a > 1:
    if a % 2 == 1:
      break
    else:
      a  = a//2
      cnt += 1
  ans = max(2**cnt,ans)
 
print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
if(n<=64):
  print(64)
elif(n<=32):
  print(32)
elif(n<=16):
  print(16)
elif(n<=8):
  print(8)
elif(n<=4):
  print(4)
elif(n<=2):
  print(2)
else:
  print(1)

Submission status: Wrong Answer

Solution code:
N = int(input())

max_count = 0
for i in range(1, N+1):
  n = i
  count = 0
  while n > 0 and n % 2 == 0:
    n = n//2
    count += 1
  if count == max(max_count, count):
    res = 1
    max_count = count
print(res)

Submission status: Wrong Answer

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

n = int(input())

maxcount = 0

ans = 0

for i in range(n):
    count = 0
    j = i
    while j % 2 != 0:
        j = int(j/2)
        count += 1
    if maxcount < count:
        maxcount = count
        ans = i + 1

print(ans)

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(6,0,-1):
  if 2**i<=n:
    print(2**i)
    break

Submission status: Wrong Answer

Solution code:
n=int(input())
for i in range(6,0,-1):
  if 2**i<=n:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
N=int(input())
a=1
for i in range(7):
    if a*2 >= N:
        break
    a*=2
print(a)

Submission status: Wrong Answer

Solution code:
N=int(input())
a=1
for i in range(7):
  if a >= N:
    break
  a*=2
print(a)

Submission status: Wrong Answer

Solution code:
def break_number(N: int)->int:
    freq = [0] * (N+1)
    d = 2
    while d <= N:
        i = d
        while i <= N:
            freq[i] += 1
            i += d
        d <<= 1

    return freq.index(max(freq))


if __name__ == "__main__":
    N = int(input())
    ans = break_number(N)
    print(ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
i=0
while 2**i<N:
  i +=1
  
print(2**i)

Submission status: Wrong Answer

Solution code:
N = int(input())
a = 2
while N >= a*2:
  a = a*2
print(a)

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
escape = 0
for i in range(N, 1, -1):
	if i == 1:
		print(1)
		break
	ans = i
	while(1):
		if i%2 != 0:
			break
		if i%2 == 0 and i/2 != 1:
			i = i/2
		if i%2 == 0 and i/2 == 1:
			print(ans)
			escape = 1
			break
	if escape == 1:
		break

Submission status: Wrong Answer

Solution code:
N = int(input())
ans = 0
escape = 0
for i in range(N, 1, -1):
	ans = i
	while(1):
		if i%2 != 0:
			break
		if i%2 == 0 and i/2 != 1:
			i = i/2
		if i%2 == 0 and i/2 == 1:
			print(ans)
			escape = 1
			break
	if escape == 1:
		break

Submission status: Wrong Answer

Solution code:
N = int(input())
max = 1
max_num = 1
for i in range(1,N+1):
    cnt = 0
    num = i
    while num % 2 == 0:  
        num /= 2
        cnt += 1
        if cnt > max:
            max = cnt
            max_num = i
print(max_num)

Submission status: Wrong Answer

Solution code:
N = int(input())
max = 0
max_num = 0
for i in range(1,N+1):
    cnt = 0
    num = i
    while num % 2 == 0:  
        num /= 2
        cnt += 1
        if cnt > max:
            max = cnt
            max_num = i
print(max_num)

Submission status: Wrong Answer

Solution code:
N = int(input())
if N == 1:
    print(1)
    exit()
X = [2, 4, 8, 16, 32, 64, 128]
for i, x in enumerate(X):
    if N < x:
      print(X[i - 1])

Submission status: Wrong Answer

Solution code:
import math
n=int(input());print(2**(math.log(n,2)//1))

Submission status: Wrong Answer

Solution code:
from sys import exit
# A,B,C = [int(n) for n in input().split()]
N = int(input())
# a = [int(input()) for _ in range(N)]
# S = str(input())
# L = len(S)
# T = str(input())
maxd = 0
ans = 0
for i in range(1,N+1):
    tmp = i
    tmpa = 0
    while(tmp%2 == 0):
        tmp//=2
        tmpa +=1
    if(maxd < tmpa):
        ans = i
        maxd = tmpa
print(ans)

Submission status: Wrong Answer

Solution code:
import math
a = int(input())
print(int(math.log2(a)))

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007

#A
def A():
    n = II()
    print("ABC"+str(n))
    return

#B
def B():
    ni = [2 ** i for i in range(1, 10)]
    n = II()
    ans = 1
    for i in range(1, n + 1):
        if i in ni:
            ans = i
    print(ans)        
    return

#C
def C():
    return

#D
def D():
    return

#E
def E():
    return

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

#Solve
if __name__ == '__main__':
    A()

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
n = int(input())

ma = 0

c = 0
while True:
	c += 1  
	k = 2**c
	if k > n:
		break      
    
	if k > ma:
		ma = k
		 
    
print(ma)

Submission status: Wrong Answer

Solution code:
n = int(input())

max = 0
max_c = 0
for i in range(1,n+1):
	c = 0
	k = i
	while k % 2 == 0: 
		k = int(k/2)
		c += 1
	if c > max_c:
		max = i
		max_c = c
        
print(max)

Submission status: Wrong Answer

Solution code:
N = int(input())
l = list(range(1,N+1))
max = 2
for i in range(N):
       if (2**i) > max and 2**i <= N:
               max = 2**i
print(max)

Submission status: Wrong Answer

Solution code:
n = int(input())

res = 1
for i in range(10):
    if 2**i > n:
        res = 2**(i-1)

print(res)

Submission status: Wrong Answer

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

while result*2 < N:
    result *= 2

print(result)

Submission status: Wrong Answer

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

while int(result/2) < N:
    result *= 2

print(result)

Submission status: Wrong Answer

Solution code:
N = bin(int(input()))
print(len(N)-3)

Submission status: Wrong Answer

Solution code:
N = bin(int(input()))[::-1]
print(N.find('1'))

Submission status: Wrong Answer

Solution code:
from math import log2
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline


def ceil(n):
    return int(-n//1)*(-1)


N = int(input())

ans = ceil(log2(N))
if ans > N:
    ans -= 1
print(2**ans)

Submission status: Wrong Answer

Solution code:
N = int(input())
res = 0
best_count = 0
for i in range(1, N + 1):
    counter = 0
    _i = i
    while True:
        counter += 1
        if (_i // 2) > 1:
            _i = _i // 2
        else:
            break
    if best_count < counter:
        best_count = counter
        res = max(i, res)
print(res)

Submission status: Wrong Answer

Solution code:
""" AtCoder """

N = int(input())
ans_list = [2, 4, 8, 16, 32, 64]
ans_list = ans_list[::-1]

if N == 1:
    print(1)
    exit()

for i in range(7):
    if N > ans_list[i]:
        print(ans_list[i])
        break

Submission status: Wrong Answer

Solution code:
""" AtCoder """

N = int(input())
ans_list = [1, 2, 4, 8, 16, 32, 64]
ans_list = ans_list[::-1]

for i in range(7):
    if N > ans_list[i]:
        print(ans_list[i])
        break

Submission status: Wrong Answer

Solution code:
N = int(input())

nList = [i + 1 for i in range(N)]
res = -1
for n in nList :
    count = 0
    buf = n
    while buf % 2 == 0 :
        count += 1
        buf = buf / 2
    if res < count :
        res = n
print(res)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
currCount = 0
ans = 0
for i in range(n+1):
    currCount = 0
    currNum = i
    while (i % 2) == 0:
        if i == 0:
            break
        i = int(i / 2)
        currCount += 1
    if count < currCount:
        count = currCount
        ans = currNum
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
currCount = 0
ans = 0
for i in range(n+1):
    currCount = 0
    currNum = i
    while (i % 2) == 0:
        if i == 0:
            break
        i = int(i / 2)
        currCount += 1
    if count < currCount:
        count = currCount
        ans = currNum
print(ans, count)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
currCount = 0
ans = 0
for i in range(n):
    currCount = 0
    currNum = i
    while (i % 2) == 0:
        if i == 0:
            break
        i = int(i / 2)
        currCount += 1
    if count < currCount:
        count = currCount
        ans = currNum
print(ans)

Submission status: Wrong Answer

Solution code:
n = int(input())
count = 0
currCount = 0
for i in range(n):
    currCount = 0
    while i % 2 != 0:
        i = int(i / 2)
        currCount += 1
    if count < currCount:
        count = currCount
print(count)

Submission status: Wrong Answer

Solution code:
N = int(input())
j = 0
c2 = 0
for i in range(1, N+1):
	a = i
	c = 0
	while a % 2 == 0:
		c = c + 1
		a = a / 2
		if c >= c2:
			c2 = c
			j = i
print(j)

Submission status: Wrong Answer

Solution code:
n = int(input())
num = [2**i for i in range(6)]
while n not in num:
    n -= 1
print(n)

Submission status: Wrong Answer

Solution code:
n = int(input())
cand = [2**x for x in range(7)]
for i in range(n,0,-1):
    if i in cand:
        print(i)

Submission status: Wrong Answer

Solution code:
N = int(input())
power = [64,32,16,8,4,2,1]
for i in power:
  if N <= i:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
N = int(input())
power = [1,2,4,8,16,32,64]
for i in range(len(power)):
  if N >= power[i] :
    print(power[i])
    break

Submission status: Wrong Answer

Solution code:
N = int(input())
power = [1,2,4,8,16,32,64]
for i in range(len(power)):
  if N <= power[i] :
    print(power[i])
    break

Submission status: Wrong Answer

Solution code:
import sys
sys.setrecursionlimit(10**6)

def f(n):
  if n == 1:
    return True
  elif n%2 == 0:
    return f(n/2)
  else:
    return False

n = int(input())
for i in range(n,0,-1):
  if f(n):
    print(i)
    break

Submission status: Wrong Answer

Solution code:
a = [64, 32, 16, 8, 4, 2, 1]
N = int(input())
 
for i in a:
  if i < N:
    print(i)
    break

Submission status: Wrong Answer

Solution code:
a = [64, 32, 16, 8, 4, 2, 1]
N = int(input())

for i in a:
  if i < N:
    print(i)

Submission status: Wrong Answer

Solution code:
n = int(input())

for i in range(n):
    if 2**i >= n:
        ans = 2**(i-1)
        break

print(ans)

Submission status: Wrong Answer

Solution code:
def counter(n):
  count = 0
  while(n%2 == 0):
    count += 1
    n = int(n/2)
  return count

N = int(input())
max = 0
ans = 0
for i in range(N):
  if(max < counter(i+1)):
    max = counter(i+1)
    ans = i+1
    
print(ans)

Submission status: Wrong Answer

Solution code:
import sys
n=input()
kaisuu = 0
ans = 0
if n == 1:
    print(1)
    sys.exit()
for i in range(1,int(n)+1):
    count = 0
    num = i
    while(num % 2 == 0):
        count = count + 1
        num /= 2
    if kaisuu < count:
        kaisuu = count
        ans = i

print(ans)