TnT/CodeNet4Repair huggingface dataset:
Problem:
An _X -layered kagami mochi_ (X ≥ 1) is a pile of X round mochi (rice cake) stacked vertically where each mochi (except the bottom one) has a smaller diameter than that of the mochi directly below it. For example, if you stack three mochi with diameters of 10, 8 and 6 centimeters from bottom to top in this order, you have a 3-layered kagami mochi; if you put just one mochi, you have a 1-layered kagami mochi.  Lunlun the dachshund has N round mochi, and the diameter of the i-th mochi is d_i centimeters. When we make a kagami mochi using some or all of them, at most how many layers can our kagami mochi have?

Incorrect submission (verdict: Wrong Answer):

Fixed, accepted submission:
def solve():
    n = int(input())
    lists = [int(input()) for _ in range(n)]
    print(len(set(lists)))

solve()
Problem:
How many multiples of d are there among the integers between L and R (inclusive)?

Incorrect submission (verdict: Wrong Answer):
l, r, d = map(int, input().split())

ans = int(r/d)-int(l-1/d)
print(ans)

Fixed, accepted submission:
l, r, d = map(int, input().split())

ans = int(r/d)-int((l-1)/d)
print(ans)
Problem:
Our world is one-dimensional, and ruled by two empires called Empire A and Empire B.  The capital of Empire A is located at coordinate X, and that of Empire B is located at coordinate Y.  One day, Empire A becomes inclined to put the cities at coordinates x_1, x_2, ..., x_N under its control, and Empire B becomes inclined to put the cities at coordinates y_1, y_2, ..., y_M under its control.  If there exists an integer Z that satisfies all of the following three conditions, they will come to an agreement, but otherwise war will break out.    * X < Z \leq Y   * x_1, x_2, ..., x_N < Z   * y_1, y_2, ..., y_M \geq Z  Determine if war will break out.

Incorrect submission (verdict: Wrong Answer):
n,m,x,y=map(int,input().split())
x=list(map(int,input().split()))
y=list(map(int,input().split()))

if max(x)+1<min(y):
    print('No War')
else:
    print('War')


Fixed, accepted submission:
n,m,x,y=map(int,input().split())
X=list(map(int,input().split()))
Y=list(map(int,input().split()))

if max(X)<min(Y) and (x+1<=min(Y) and max(X)+1<=y):
    print('No War')
else:
    print('War')
Problem:
You can obtain profits from foreign exchange margin transactions. For example, if you buy 1000 dollar at a rate of 100 yen per dollar, and sell them at a rate of 108 yen per dollar, you can obtain (108 - 100) × 1000 = 8000 yen.  Write a program which reads values of a currency $R_t$ at a certain time $t$ ($t = 0, 1, 2, ... n-1$), and reports the maximum value of $R_j - R_i$ where $j > i$ .

Incorrect submission (verdict: Wrong Answer):
p = 0
n = int(input())
a = int(input())
for _ in range(n-1):
	b = int(input())
	if p<abs(a-b):
		p = a-b
	a = b
print(p)

Fixed, accepted submission:
l = 2*10**9
p = -2*10**9
n = int(input())
for _ in range(n):
	x = int(input())
	p = max(x-l,p)
	l = min(x,l)
print(p)
Problem:
We call a 4-digit integer with three or more consecutive same digits, such as 1118, **good**.  You are given a 4-digit integer N. Answer the question: Is N **good**?

Incorrect submission (verdict: Wrong Answer):
N = input()
a = set()
for i in range(len(N)):
  a.add(N[i])
if len(list(a)) >=3:
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
N = input()

for i in range(0,2):
  if N[i]==N[i+1] and N[i+1]==N[i+2]:
    print("Yes")
    break
else:
  print("No")
Problem:
There are a total of A + B cats and dogs. Among them, A are known to be cats, but the remaining B are not known to be either cats or dogs.  Determine if it is possible that there are exactly X cats among these A + B animals.

Incorrect submission (verdict: Wrong Answer):
a,b,c=map(int,input().split());print("Yes") if a<=c and c-a<=b else print("No")

Fixed, accepted submission:
a,b,c=map(int,input().split());print("YNEOS"[not(a+b>=c>=a)::2])
Problem:
AORイカちゃんはテストに合格するため勉強しています。  AORイカちゃんは、 $N$ 問、問題を解きました。 その後、解いた問題の丸付けを以下の手順で行います。    1. 解答の正誤を確認する。   2. 解答が正しい場合はマル印、誤っていた場合はバツ印を解答用紙に書き込む。  解答が $2$ 問連続で誤りであるとわかった瞬間、テストに不合格になってしまう恐怖から、AORイカちゃんは失神してしまいます。そして、それ以降丸付けを行うことはできません。  失神は手順 $1$ と $2$ の間で起こります。  AORイカちゃんが解いた問題の数を表す整数 $N$ と、解答の正誤を表した長さ $N$ の文字列 $S$ が与えられます。 文字列は 'o' と 'x' からなり、 'o' は解答が正しく、 'x' は解答が誤りであることを表しています。 $i$ 文字目が $i$ 問目の正誤を表しており、AORイカちゃんは $1$ 問目から順番に丸付けを行います。  AORイカちゃんが正誤を書き込めた問題数を出力してください。

Incorrect submission (verdict: Wrong Answer):
input();s=input();f=s[0];a=1
for x in s[1:]:
    if f==x=='x':break
    a+=1
print(a)


Fixed, accepted submission:
input();s=input();f=s[0];a=1
for x in s[1:]:
    if f==x=='x':break
    a+=1;f=x
print(a)
Problem:
Snuke has one biscuit and zero Japanese yen (the currency) in his pocket. He will perform the following operations exactly K times in total, in the order he likes:    * Hit his pocket, which magically increases the number of biscuits by one.   * Exchange A biscuits to 1 yen.   * Exchange 1 yen to B biscuits.  Find the maximum possible number of biscuits in Snuke's pocket after K operations.

Incorrect submission (verdict: Wrong Answer):
K, A, B = map(int, input().split())

def f():
    
    a = A - 1
    
    b = K - a
    
    d, m = divmod(b, 2)
    print(a,b, d, m)
    return A + (B - A) * d + m

def g():
    return 1 + K

if (A + 2) < B:
    print(f())
else:
    print(g())


Fixed, accepted submission:
K, A, B = map(int, input().split())

def f():
    
    a = A - 1
    
    b = K - a
    
    d, m = divmod(b, 2)
    return A + (B - A) * d + m

def g():
    return 1 + K

if (A + 2) < B:
    print(f())
else:
    print(g())
Problem:
In this problem, we only consider strings consisting of lowercase English letters.  Strings s and t are said to be **isomorphic** when the following conditions are satisfied:    * |s| = |t| holds.   * For every pair i, j, one of the following holds:     * s_i = s_j and t_i = t_j.     * s_i \neq s_j and t_i \neq t_j.  For example, `abcac` and `zyxzx` are isomorphic, while `abcac` and `ppppp` are not.  A string s is said to be in **normal form** when the following condition is satisfied:    * For every string t that is isomorphic to s, s \leq t holds. Here \leq denotes lexicographic comparison.  For example, `abcac` is in normal form, but `zyxzx` is not since it is isomorphic to `abcac`, which is lexicographically smaller than `zyxzx`.  You are given an integer N. Print all strings of length N that are in normal form, in lexicographically ascending order.

Incorrect submission (verdict: Wrong Answer):
K = int(input())
S = 'a'*K
arr = [chr(i) for i in range(97, 97+26)]
print(arr)

Fixed, accepted submission:
K = int(input())-1
al = [chr(i) for i in range(97, 97+26)]
S_arr = [al[0]]
for i in range(K):
  new_S_arr = []
  for S in S_arr:
    for j in range(len(set(list(S)))+1):
      new_S_arr.append(S + al[j])
  S_arr = new_S_arr

for S in S_arr:
  print(S)
Problem:
On some day in January 2018, Takaki is writing a document. The document has a column where the current date is written in `yyyy/mm/dd` format. For example, January 23, 2018 should be written as `2018/01/23`.  After finishing the document, she noticed that she had mistakenly wrote `2017` at the beginning of the date column. Write a program that, when the string that Takaki wrote in the date column, S, is given as input, modifies the first four characters in S to `2018` and prints it.

Incorrect submission (verdict: Wrong Answer):
t=list(input())
t[3]="8"
print(str(t))


Fixed, accepted submission:
t=list(input())
t[3]="8"
str="".join(t)
print(str)
Problem:
A 君は高校の休みを利用して、高速バス(以下、「バス」 )で一人旅をする計画を立てています。まず、A 君は一番行ってみたい町を選んでそこを目的地にしました。次に出発地から目的地までバスを乗り継いでいくルートを決めなければなりません。乗り継ぎをするときは、バスを降りてから別のバスに乗り換えるので、それぞれのバスの乗車券が必要になります。  A 君は親戚のおじさんからバスの割引券を何枚かもらいました。 この券を 1 枚使うと乗車券 1 枚を半額で購入できます。例えば、図 1 の出発地5から目的地1へ行く場合には、5→4→6→2→1と5→3→1の二つの経路が考えられます。割引券が 2 枚あるとすると、交通費を最も安くするには5→4→6→2→1の経路をたどった場合、4→6と6→2の路線に割引を利用し、合計料金は 4600円となります。一方、5→3→1の経路をたどった場合、5→3と3→1の路線に割引を利用し、合計料金は 3750 円となります。  A 君は観光にお金を回したいので、交通費はできるだけ少なくしようと考えています。そこで A 君は、出発地から目的地までの最も安い交通費を求めるプログラムを作成することにしました。       図1  割引券の枚数、バスがつなぐ町の数、バスの路線数、各バスの路線情報を入力とし、出発地から目的地までの最も安い交通費を出力するプログラムを作成してください。各バスは双方向に同一料金で運行しています。また、町の数を n とすると、町にはそれぞれ異なる 1 から n までの番号が振られています。出発地から目的地までの経路は必ず存在するものとします。

Incorrect submission (verdict: Wrong Answer):
from sys import stdin
from heapq import heappush,heappop

while(True):
    c,n,m,s,d = map(int, stdin.readline().split())
    if not c: break
    ma = [[] for _ in range(n)]
    s -= 1
    d -= 1
    for _ in range(m):
        a,b,f = map(int, stdin.readline().split())
        a -= 1
        b -= 1
        ma[a].append([f,b])
        ma[b].append([f,a])
    cost = [[10**10]*(c+1) for _ in range(n)]
    cost[s][c] = 0
    que = [[ cost[s][c], s, c ]]
    while que:
        co, pl, ti = heappop(que)
        for fee, town in ma[pl]:
            if cost[town][ti] > co + fee:
                cost[town][ti] = co+fee
                heappush(que,[cost[town][ti],town,ti])
            if ti and cost[town][ti-1] > co+fee:
                cost[town][ti-1] = co + fee//2
                heappush(que,[cost[town][ti-1],town,ti-1])
    print(min(ma[d])[0])


Fixed, accepted submission:
from sys import stdin
from heapq import heappush,heappop

while(True):
    c,n,m,s,d = map(int, stdin.readline().split())
    if not c: break
    ma = [[] for _ in range(n)]
    s -= 1
    d -= 1
    for _ in range(m):
        a,b,f = map(int, stdin.readline().split())
        a -= 1
        b -= 1
        ma[a].append([f,b])
        ma[b].append([f,a])
    cost = [[10**10]*(c+1) for _ in range(n)]
    cost[s][c] = 0
    que = [[ cost[s][c], s, c ]]
    while que:
        co, pl, ti = heappop(que)
        for fee, town in ma[pl]:
            if cost[town][ti] > co+fee:
                cost[town][ti] = co+fee
                heappush(que,[cost[town][ti],town,ti])
            if ti and cost[town][ti-1] > co+fee//2:
                cost[town][ti-1] = co+fee//2
                heappush(que,[cost[town][ti-1],town,ti-1])
    print(min(cost[d]))
Problem:
You are given three integers A, B and C. Determine whether C is not less than A and not greater than B.

Incorrect submission (verdict: Wrong Answer):
a,b,c=map(int,input().split())
print("Yes" if a<=b and b<=c else "No")

Fixed, accepted submission:
a,b,c=map(int,input().split())
print("Yes" if a<=c and c<=b else "No")
Problem:
You are given a string S consisting of lowercase English letters. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:    * Append one of the following at the end of T: `dream`, `dreamer`, `erase` and `eraser`.

Incorrect submission (verdict: Wrong Answer):
s = input()
s.replace("eraser","")
s.replace("erase","")
s.replace("dreamer","")
s.replace("dream","")
if s:
    print("NO")
else:
    print("YES")

Fixed, accepted submission:
s = input()
s = s.replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")
Problem:
Find the largest square number not exceeding N. Here, a _square number_ is an integer that can be represented as the square of an integer.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
i=1
res = 0
while i*i<=n:
    if i*i==n:
        res=i*i
    i+=1
print(i)

Fixed, accepted submission:
n = int(input())
i=1
res = 0
while i*i<=n:
    res = i*i
    i+=1
print(res)
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
print(int(input()) % 1000)

Fixed, accepted submission:
a=int(input()) % 1000
print(1000-a if a>0 else 0)
Problem:
It is September 9 in Japan now.  You are given a two-digit integer N. Answer the question: Is 9 contained in the decimal notation of N?

Incorrect submission (verdict: Wrong Answer):
print('nyoe s'['9' in input()::2])

Fixed, accepted submission:
print('NYoe s'['9' in input()::2])
Problem:
Takahashi has a strong stomach. He never gets a stomachache from eating something whose "best-by" date is at most X days earlier. He gets a stomachache if the "best-by" date of the food is X+1 or more days earlier, though.  Other than that, he finds the food delicious if he eats it not later than the "best-by" date. Otherwise, he does not find it delicious.  Takahashi bought some food A days before the "best-by" date, and ate it B days after he bought it.  Write a program that outputs `delicious` if he found it delicious, `safe` if he did not found it delicious but did not get a stomachache either, and `dangerous` if he got a stomachache.

Incorrect submission (verdict: Wrong Answer):
X,A,B=(int(i) for i in input().split())
c=int(B-A)
if A<B:
  print('delicious')
elif c<X:
  print('safe')
else:
  print('dangerous')

Fixed, accepted submission:
X,A,B=(int(i) for i in input().split())
c=int(B-A)
if c<=0:
  print('delicious')
elif 0<c<=X:
  print('safe')
elif c>X:
  print('dangerous')
Problem:
AtCoDeer the deer found two positive integers, a and b. Determine whether the product of a and b is even or odd.

Incorrect submission (verdict: Wrong Answer):
import math
b,c=map(str,input().split())
d=math.sqrt(int(b+c))
if float.is_integer(d):
  print("Yes")
else:
  print("No")

Fixed, accepted submission:
b,c=map(int,input().split())
if b*c%2==1:
  print("Odd")
else:
  print("Even")
Problem:
In programming languages like C/C++, a goto statement provides an unconditional jump from the "goto" to a labeled statement. For example, a statement "goto CHECK_NUM;" is executed, control of the program jumps to CHECK_NUM. Using these constructs, you can implement, for example, loops.  Note that use of goto statement is highly discouraged, because it is difficult to trace the control flow of a program which includes goto.  Write a program which does precisely the same thing as the following program (this example is wrtten in C++). Let's try to write the program without goto statements.                 void call(int n){   int i = 1;  CHECK_NUM:   int x = i;   if ( x % 3 == 0 ){     cout << " " << i;     goto END_CHECK_NUM;   }  INCLUDE3:   if ( x % 10 == 3 ){     cout << " " << i;     goto END_CHECK_NUM;   }   x /= 10;   if ( x ) goto INCLUDE3;  END_CHECK_NUM:   if ( ++i <= n ) goto CHECK_NUM;    cout << endl; }

Incorrect submission (verdict: Wrong Answer):
i = int(input())
j = 0

while j <= i:
  if j%3 == 0:
    print(' ',end='')
    print(j)
  j += 1

Fixed, accepted submission:
n = int(input())
i = 1

while i <= n:
	if i % 3 == 0 or "3" in str(i):
		print(" ",end='')
		print(i,end='')
	i += 1
print()
Problem:
We have a 3×3 square grid, where each square contains a lowercase English letters. The letter in the square at the i-th row from the top and j-th column from the left is c_{ij}.  Print the string of length 3 that can be obtained by concatenating the letters in the squares on the diagonal connecting the top-left and bottom-right corner of the grid, from the top-left to bottom-right.

Incorrect submission (verdict: Wrong Answer):
print(input()[0]+input()[1]+input()[1])

Fixed, accepted submission:
print(input()[0]+input()[1]+input()[2])
Problem:
You are given a string S consisting of lowercase English letters. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:    * Append one of the following at the end of T: `dream`, `dreamer`, `erase` and `eraser`.

Incorrect submission (verdict: Wrong Answer):
# -*- coding: utf-8 -*-

S = input()

S = S.replace("dreamer", "")
S = S.replace("dream", "")
S = S.replace("eraser", "")
S = S.replace("erase", "").strip()


if len(S) ==0:
    print("NO")
else:
    print("YES")


Fixed, accepted submission:
# -*- coding: utf-8 -*-

S = ''.join(list(reversed(input())))

candidate = ["remaerd", "resare", "esare", "maerd"]

while True:
    flag = 0
    if S[:7] == "remaerd":
        S = S[7:]
        flag = 1
        #print(S)
    if S[:6] == "resare":
        S = S[6:]
        flag = 1
        #print(S)
    if S[:5] == "esare" or S[:5] ==  "maerd":
        S = S[5:]
        flag = 1
        #print(S)
    if flag == 0:
        break
if len(S) == 0:
    print("YES")
else:
    print("NO")
Problem:
An integer X is called a Harshad number if X is divisible by f(X), where f(X) is the sum of the digits in X when written in base 10.  Given an integer N, determine whether it is a Harshad number.

Incorrect submission (verdict: Wrong Answer):
num=input()
s=0
for it in num:
    s+=int(it)
print(s)
num=int(num)
print(num%s)



Fixed, accepted submission:
num=input()
s=0
for it in num:
    s+=int(it)
num=int(num)
print("Yes" if num%s==0 else "No")
Problem:
Takahashi is participating in a programming contest called AXC002, and he has just submitted his code to Problem A.  The problem has N test cases.  For each test case i (1\leq i \leq N), you are given a string S_i representing the verdict for that test case. Find the numbers of test cases for which the verdict is `AC`, `WA`, `TLE`, and `RE`, respectively.  See the Output section for the output format.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range (n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s =="TLE":
    tle += 1
  else:
    re += 1
print("AC × "+str(ac))
print("WA × "+str(wa))
print("TLE × "+str(tle))
print("RE × "+str(re))

Fixed, accepted submission:
n = int(input())
ac,wa,tle,re = 0,0,0,0
for i in range (n):
  s = input()
  if s == "AC":
    ac += 1
  elif s == "WA":
    wa += 1
  elif s =="TLE":
    tle += 1
  else:
    re += 1
print("AC x "+str(ac))
print("WA x "+str(wa))
print("TLE x "+str(tle))
print("RE x "+str(re))
Problem:
We will buy a product for N yen (the currency of Japan) at a shop.  If we use only 1000-yen bills to pay the price, how much change will we receive?  Assume we use the minimum number of bills required.

Incorrect submission (verdict: Wrong Answer):
n = int(input())

print(n%1000)

Fixed, accepted submission:
n = int(input())
if n%1000 == 0:
    print(0)
else:
    print(1000-n%1000)
Problem:
You are given three words s_1, s_2 and s_3, each composed of lowercase English letters, with spaces in between. Print the acronym formed from the uppercased initial letters of the words.

Incorrect submission (verdict: Wrong Answer):
a, b, c = map(str, input().split())
ans = a[0] + b[0] + c[0]
print(ans)

Fixed, accepted submission:
a, b, c = map(str, input().split())
ans = a[0] + b[0] + c[0]
print(ans.upper())
Problem:
You are given a image with a height of H pixels and a width of W pixels. Each pixel is represented by a lowercase English letter. The pixel at the i-th row from the top and j-th column from the left is a_{ij}.  Put a box around this image and output the result. The box should consist of `#` and have a thickness of 1.

Incorrect submission (verdict: Wrong Answer):
H,W = map(int, input().split())
a = [list(map(str, input().split())) for _ in range(H)]
print('#'*(len(a[0][0])+2))
for i in range(H):
    print(''.join(['#']+a[0]+['#']))
print('#'*(len(a[0][0])+2))

Fixed, accepted submission:
H,W = map(int, input().split())
a = [input() for _ in range(H)]
print('#'*(W+2))
for i in range(H):
    print('#'+a[i]+'#')
print('#'*(W+2))
Problem:
You are given a string S of length 3 consisting of `a`, `b` and `c`. Determine if S can be obtained by permuting `abc`.

Incorrect submission (verdict: Wrong Answer):
abc = list(input())

if ('a' in abc) and ('b' in abc) and ('c' in abc):
    print('YES')
else:
    print('NO')

Fixed, accepted submission:
abc = list(input())

if ('a' in abc) and ('b' in abc) and ('c' in abc):
    print('Yes')
else:
    print('No')
Problem:
You are visiting a large electronics store to buy a refrigerator and a microwave.  The store sells A kinds of refrigerators and B kinds of microwaves. The i-th refrigerator ( 1 \le i \le A ) is sold at a_i yen (the currency of Japan), and the j-th microwave ( 1 \le j \le B ) is sold at b_j yen.  You have M discount tickets. With the i-th ticket ( 1 \le i \le M ), you can get a discount of c_i yen from the total price when buying the x_i-th refrigerator and the y_i-th microwave together. Only one ticket can be used at a time.  You are planning to buy one refrigerator and one microwave. Find the minimum amount of money required.

Incorrect submission (verdict: Wrong Answer):
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

vals = []
for _ in range(M):
    i, j, v = map(int, input().split())
    print(i, j, v)
    vals.append( a[i - 1] + b[j - 1] - v)

vals.append(min(a) + min(b))
print(min(vals))

Fixed, accepted submission:
A, B, M = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))

vals = []
for _ in range(M):
    i, j, v = map(int, input().split())
    vals.append( a[i - 1] + b[j - 1] - v)

vals.append(min(a) + min(b))
print(min(vals))
Problem:
You are given a string S consisting of lowercase English letters. Another string T is initially empty. Determine whether it is possible to obtain S = T by performing the following operation an arbitrary number of times:    * Append one of the following at the end of T: `dream`, `dreamer`, `erase` and `eraser`.

Incorrect submission (verdict: Wrong Answer):
from sys import stdin, stdout
S = stdin.readline()
S = S.replace("dreamer", "")
S = S.replace("eraser", "")
S = S.replace("dream", "")
S = S.replace("erase", "")
print("YES") if not S else print("NO")

Fixed, accepted submission:
S = input()
S = S.replace("eraser", "")
S = S.replace("erase", "")
S = S.replace("dreamer", "")
S = S.replace("dream", "")
print("YES") if not S else print("NO")
Problem:
Find the sum of the integers between 1 and N (inclusive), whose sum of digits written in base 10 is between A and B (inclusive).

Incorrect submission (verdict: Wrong Answer):
N, A, B = list(map(int, input().split()))
cnt = 0
for i in range(N):
	seq = list(map(int, list(str(i))))
	x = sum(seq)
	if A <= x and x <= B:
		cnt += 1

print(cnt)

Fixed, accepted submission:
N, A, B = list(map(int, input().split()))
cnt = 0
for i in range(N + 1):
	seq = list(map(int, list(str(i))))
	x = sum(seq)
	if A <= x and x <= B:
		cnt += i

print(cnt)
Problem:
There are N positive integers written on a blackboard: A_1, ..., A_N.  Snuke can perform the following operation when all integers on the blackboard are even:    * Replace each integer X on the blackboard by X divided by 2.  Find the maximum possible number of operations that Snuke can perform.

Incorrect submission (verdict: Wrong Answer):
N=int(input())
li= list(map(int,input().split())) 	
ans=1
minNum=li[0]

for i in range(N):
	if li[i]%2==1:
		ans=0
		break
	elif li[i] < minNum:
		minNum = li[i]
		
if not ans==0:
	n=minNum
	ans=0	
	while n%2==0:
		n=n/2
		ans= ans+1

print(ans)


Fixed, accepted submission:
N=int(input())
li= list(map(int,input().split())) 	
Ans=30
ans=0

for i in range(N):
	if li[i]%2==1:
		Ans=0
		break
	else:
		n=li[i]
		ans=0
		while n%2==0:
			n=n/2
			ans= ans+1
		if Ans>ans:
			Ans =ans

print(Ans)