TnT/CodeNet4Repair huggingface dataset:
Problem:
We have N cards. A number a_i is written on the i-th card.   Alice and Bob will play a game using these cards. In this game, Alice and Bob alternately take one card. Alice goes first.   The game ends when all the cards are taken by the two players, and the score of each player is the sum of the numbers written on the cards he/she has taken. When both players take the optimal strategy to maximize their scores, find Alice's score minus Bob's score.

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

a = 0
b = 0

card.sort(reverse=True)

#print(card)
for i in range(1,n+1):
  print(a,b)
  if i % 2 == 0:
    b = b + card[i-1]
  else:
    a += card[i-1]
#print(a,b)
print(a - b)

Fixed, accepted submission:
n = int(input())
c = list(map(int,input().split()))
a,b = 0,0

c.sort(reverse=True)
for i,j in enumerate(c):
  if i % 2 == 0:
    a += j
  else:
    b += j

print(a-b)
Problem:
We have N sticks with negligible thickness. The length of the i-th stick is A_i.  Snuke wants to select four different sticks from these sticks and form a rectangle (including a square), using the sticks as its sides. Find the maximum possible area of the rectangle.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
d = {}
for ai in input().split():
  ai = int(ai)
  if ai not in d:
    d[ai] = 0
  d[ai] += 1

n2 = [d[k] for k in d if d[k] > 1]
n4 = [d[k] for k in d if d[k] > 3]

n2.sort(reverse = True)
n4.sort(reverse = True)

ans = 0

if n4:
  ans = n4[0] ** 2

if len(n2) > 1:
  max(ans, n2[0] * n2[1])

print(ans)

Fixed, accepted submission:
n = int(input())
d = {}
for ai in input().split():
  ai = int(ai)
  if ai not in d:
    d[ai] = 0
  d[ai] += 1

n2 = [k for k in d if d[k] > 1]
n4 = [k for k in d if d[k] > 3]

n2.sort(reverse = True)
n4.sort(reverse = True)

ans = 0

if n4:
  ans = n4[0] ** 2

if len(n2) > 1:
  ans = max(ans, n2[0] * n2[1])

print(ans)
Problem:
Iroha loves _Haiku_. Haiku is a short form of Japanese poetry. A Haiku consists of three phrases with 5, 7 and 5 syllables, in this order.  To create a Haiku, Iroha has come up with three different phrases. These phrases have A, B and C syllables, respectively. Determine whether she can construct a Haiku by using each of the phrases once, in some order.

Incorrect submission (verdict: Wrong Answer):
n = input().split()
print(["NO","YES"][n.count("7") ==2 and n.count("5") ==1])

Fixed, accepted submission:
n = input().split()
print(["NO","YES"][n.count("7")==1 and n.count("5")==2])
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):
n = int(input())
print(len(set([a for a in range(n)])))

Fixed, accepted submission:
n = int(input())
print(len(set([int(input()) for _ in range(n)])))
Problem:
You are given an integer N that has exactly four digits in base ten. How many times does `2` occur in the base-ten representation of N?

Incorrect submission (verdict: Wrong Answer):
N = list( input() )
istwo = [ x == 2 for x in N ]
print( sum( istwo ) )


Fixed, accepted submission:
N = list( input() )
istwo = [ x == "2" for x in N ]
print( sum( istwo ) )
Problem:
Let f(n) be the number of triples of integers (x,y,z) that satisfy both of the following conditions:    * 1 \leq x,y,z   * x^2 + y^2 + z^2 + xy + yz + zx = n  Given an integer N, find each of f(1),f(2),f(3),\ldots,f(N).

Incorrect submission (verdict: Wrong Answer):
# from pprint import pprint
# import math
# import collections
from numba import jit

N = int(input())



# a = list(map(int, input().split(' ')))

@jit(cache=True)
def calc(x, y, z):
    return x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x


p = []
for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            
            p.append(calc(x, y, z))

# print(p)

for i in range(1, N):
    if i == 6:
        print(1)
    elif i in p:
        print(3)
    else:
        print(0)


Fixed, accepted submission:
# from pprint import pprint
# import math
# import collections
from numba import jit

N = int(input())


# a = list(map(int, input().split(' ')))

@jit(cache=True)
def calc(x, y, z):
    return x ** 2 + y ** 2 + z ** 2 + x * y + y * z + z * x


res = [0] * 1000009

for x in range(1, 100):
    for y in range(1, 100):
        for z in range(1, 100):
            n = calc(x, y, z)
            res[n - 1] += 1

for i in range(N):
    print(res[i])
Problem:
Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.

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

Fixed, accepted submission:
a,b,c = map(int,input().split())
print("YES" if b-a==c-b else "NO")
Problem:
Today is August 24, one of the five Product Days in a year.  A date m-d (m is the month, d is the date) is called a Product Day when d is a two-digit number, and all of the following conditions are satisfied (here d_{10} is the tens digit of the day and d_1 is the ones digit of the day):    * d_1 \geq 2   * d_{10} \geq 2   * d_1 \times d_{10} = m  Takahashi wants more Product Days, and he made a new calendar called Takahashi Calendar where a year consists of M month from Month 1 to Month M, and each month consists of D days from Day 1 to Day D.  In Takahashi Calendar, how many Product Days does a year have?

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

ans = 0
for month in range(4, m):
  for day in range(22, d):
    sday = str(day)
    if int(sday[1]) < 2:
      continue
    if int(sday[0]) * int(sday[1]) == month:
      ans += 1

print(ans)

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

ans = 0
for month in range(4, m+1):
  for day in range(22, d+1):
    sday = str(day)
    if int(sday[1]) < 2:
      continue
    if int(sday[0]) * int(sday[1]) == month:
      ans += 1

print(ans)
Problem:
There are two rectangles. The lengths of the vertical sides of the first rectangle are A, and the lengths of the horizontal sides of the first rectangle are B. The lengths of the vertical sides of the second rectangle are C, and the lengths of the horizontal sides of the second rectangle are D.  Print the area of the rectangle with the larger area. If the two rectangles have equal areas, print that area.

Incorrect submission (verdict: Wrong Answer):
print(1000000000+7)

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

def main():
    a, b, c, d = map(int, input().split())

    print(a * b) if a * b > c * d else print(c * d)

if __name__ == '__main__':
    main()
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):
x=int(input())
from math import ceil
x=ceil(x/1000)*1000
print(x)

Fixed, accepted submission:
from math import ceil
x=int(input())

print(ceil(x/1000)*1000-x)
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):
n=int(input())
T=[0]*n
for i in range(n):
  T[i]=int(input())
t=set(T)
print(t)

Fixed, accepted submission:
n=int(input())
T=[0]*n
for i in range(n):
  T[i]=int(input())
t=len(set(T))
print(t)
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 = s.replace('erase','')
s = s.replace('eraser','')
s = s.replace('dream','')
s = s.replace('dreamer','')
if s:
    print('YES')
else:
    print('NO')

Fixed, accepted submission:
s = input().replace('eraser','').replace('erase','').replace('dreamer','').replace('dream','')
if s:
    print('NO')
else:
    print('YES')
Problem:
Three poles stand evenly spaced along a line. Their heights are a, b and c meters, from left to right. We will call the arrangement of the poles _beautiful_ if the tops of the poles lie on the same line, that is, b-a = c-b.  Determine whether the arrangement of the poles is beautiful.

Incorrect submission (verdict: Wrong Answer):
a, b, c = [ int(v) for v in input().split() ]

if c-b == b-a:
  ans = "yes"
else:
  ans = "NO"
print(ans)

Fixed, accepted submission:
a, b, c =  [ int(v) for v in input().split() ]

if (a-b) == (b-c):
  print("YES")
else:
  print("NO")
Problem:
You have A 500-yen coins, B 100-yen coins and C 50-yen coins (yen is the currency of Japan). In how many ways can we select some of these coins so that they are X yen in total?  Coins of the same kind cannot be distinguished. Two ways to select coins are distinguished when, for some kind of coin, the numbers of that coin are different.

Incorrect submission (verdict: Wrong Answer):
a = int(input())
b= int(input())
c = int(input())
x = int(input())

pattern = 0

for i in range(a+1):
    if x-500*i==0:
        pattern+=1
    for j in range(b+1):
        if x-500*i-100*j==0:
            pattern+=1
        for k in range(c+1):
            if x-500*i-100*j-50*k==0:
                pattern+=1

print(pattern)

Fixed, accepted submission:
a = int(input())
b= int(input())
c = int(input())
x = int(input())

pattern = 0

for i in range(a+1):
    for j in range(b+1):
        for k in range(c+1):
            if x-500*i-100*j-50*k==0:
                pattern+=1

print(pattern)
Problem:
Write a program of the Insertion Sort algorithm which sorts a sequence A in ascending order. The algorithm should be based on the following pseudocode:                 for i = 1 to A.length-1     key = A[i]     /* insert A[i] into the sorted sequence A[0,...,j-1] */     j = i - 1     while j >= 0 and A[j] > key         A[j+1] = A[j]         j--     A[j+1] = key   Note that, indices for array elements are based on 0-origin.  To illustrate the algorithms, your program should trace intermediate result for each step.

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

for i in range(1, n):
    v = a[i]
    j = i - 1
    while j >= 0 and a[j] > v:
        a[j + 1] = a[j]
        j -= 1
    a[j + 1] = v
    print(' '.join(list(map(str, a))))

Fixed, accepted submission:
n = int(input())
a = list(map(int, input().split()))

for i in range(1, n):
    print(' '.join(list(map(str, a))))
    v = a[i]
    j = i - 1
    while j >= 0 and a[j] > v:
        a[j + 1] = a[j]
        j -= 1
    a[j + 1] = v

print(' '.join(list(map(str, a))))
Problem:
There are N items, numbered 1, 2, \ldots, N. For each i (1 \leq i \leq N), Item i has a weight of w_i and a value of v_i.  Taro has decided to choose some of the N items and carry them home in a knapsack. The capacity of the knapsack is W, which means that the sum of the weights of items taken must be at most W.  Find the maximum possible sum of the values of items that Taro takes home.

Incorrect submission (verdict: Wrong Answer):
import numpy as np
N, W = map(int, input().split())

dp = np.zeros(W + 1, int)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])
    print(dp)

print(dp[-1])


Fixed, accepted submission:
import numpy as np
N, W = map(int, input().split())

dp = np.zeros(W + 1, int)

for i in range(N):
    w, v = map(int, input().split())
    np.maximum(dp[:-w] + v, dp[w:], out=dp[w:])

print(dp[-1])
Problem:
Snuke is going to open a contest named "AtCoder s Contest". Here, s is a string of length 1 or greater, where the first character is an uppercase English letter, and the second and subsequent characters are lowercase English letters.  Snuke has decided to abbreviate the name of the contest as "AxC". Here, x is the uppercase English letter at the beginning of s.  Given the name of the contest, print the abbreviation of the name.

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


Fixed, accepted submission:
[print(i[0], end="") for i in input().split()]
print()
Problem:
We held two competitions: Coding Contest and Robot Maneuver.  In each competition, the contestants taking the 3-rd, 2-nd, and 1-st places receive 100000, 200000, and 300000 yen (the currency of Japan), respectively. Furthermore, a contestant taking the first place in both competitions receives an additional 400000 yen.  DISCO-Kun took the X-th place in Coding Contest and the Y-th place in Robot Maneuver. Find the total amount of money he earned.

Incorrect submission (verdict: Wrong Answer):
x,y = map(int,input().split())
ans = 0
if x == 1 and y == 1:
  print(1000000)
elif x < 4 and y > 3:
  ans += 100000*(4-x)
elif x > 3 and y < 4:
  ans += 100000*(4-y)
elif x < 4 and y < 4:
  ans += 100000*(8-x-y)
else:
  print(0)
print(ans)

Fixed, accepted submission:
x,y = map(int,input().split())
if x == 1 and y == 1:
  print(1000000)
elif x < 4 and y > 3:
  print(100000*(4-x))
elif x > 3 and y < 4:
  print(100000*(4-y))
elif x < 4 and y < 4:
  print(100000*(8-x-y))
else:
  print(0)
Problem:
This contest, _AtCoder Beginner Contest_ , is abbreviated as _ABC_.  When we refer to a specific round of ABC, a three-digit number is appended after ABC. For example, ABC680 is the 680th round of ABC.  What is the abbreviation for the N-th round of ABC? Write a program to output the answer.

Incorrect submission (verdict: Wrong Answer):
print(2**(len(bin(int(input())))-3))

Fixed, accepted submission:
print("ABC"+input())
Problem:
Your friend who lives in undisclosed country is involved in debt. He is borrowing 100,000-yen from a loan shark. The loan shark adds 5% interest of the debt and rounds it to the nearest 1,000 above week by week.  Write a program which computes the amount of the debt in n weeks.

Incorrect submission (verdict: Wrong Answer):
week=int(input())
money=100000
for i in range(week):
    money=money*1.05
    if money%1000!=0:
        money=1000*(money//1000+1)

print(money)

Fixed, accepted submission:
week=int(input())
money=100000
for i in range(week):
    money=money*1.05
    if money%1000!=0:
        money=1000*(money//1000+1)

print(int(money))
Problem:
For an integer n not less than 0, let us define f(n) as follows:    * f(n) = 1 (if n < 2)   * f(n) = n f(n-2) (if n \geq 2)  Given is an integer N. Find the number of trailing zeros in the decimal notation of f(N).

Incorrect submission (verdict: Wrong Answer):
# abc148_e.py
from sys import stdin
def f(n):
	sum = 1
	while n >= 2:
		sum = sum * n
		n = n - 2
	return sum
N = int(stdin.readline().rstrip())
sum = f(N)
print(sum)
l = [int(x) for x in list(str(sum))]
l.reverse();
cnt = 0
for i in l:
	if i == 0:
		cnt = cnt + 1
	else:
		break
print(cnt)


Fixed, accepted submission:
n = int(input())
if n % 2 == 1:
 print(0)
else:
 i = 10
 ans = 0
 while i <= n:
  ans += n // i
  i *= 5
 print(ans)
Problem:
Snuke has a favorite restaurant.  The price of any meal served at the restaurant is 800 yen (the currency of Japan), and each time a customer orders 15 meals, the restaurant pays 200 yen back to the customer.  So far, Snuke has ordered N meals at the restaurant. Let the amount of money Snuke has paid to the restaurant be x yen, and let the amount of money the restaurant has paid back to Snuke be y yen. Find x-y.

Incorrect submission (verdict: Wrong Answer):
n = int(input())
print(n*800-(n%15)*200)

Fixed, accepted submission:
n = int(input())
x = n*800
y = 200*(n//15)
print(x-y)
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):
N = 3
alpha = ["a","b","c","d","e","f","g","h","i","j"]
s = "".join(alpha[:N])
print("a"*N)
print(s)


Fixed, accepted submission:
N = int(input())
def DFS(s, mx):
    if len(s) == N:
        print(s)
        return
    c = 'a'
    while c <= chr(ord(mx)+1):
        t = s + c
        DFS(t, chr(max(ord(c), ord(mx))))
        c = chr(ord(c) + 1)
DFS("", chr(ord('a')-1))
Problem:
Takahashi is organizing a party.  At the party, each guest will receive one or more snack pieces.  Takahashi predicts that the number of guests at this party will be A or B.  Find the minimum number of pieces that can be evenly distributed to the guests in both of the cases predicted.  We assume that a piece cannot be divided and distributed to multiple guests.

Incorrect submission (verdict: Wrong Answer):
a, b = map(int, input().split())
def gcd(x, y):
    while x%y != 0:
        x, y = y, x%y
    return y
ans = a * b / gcd(a, b)
print(ans)

Fixed, accepted submission:
a, b = map(int, input().split())
def gcd(x, y):
    while x%y != 0:
        x, y = y, x%y
    return y
ans = a * b / gcd(a, b)
print(int(ans))
Problem:
In the online judge system, a judge file may include multiple datasets to check whether the submitted program outputs a correct answer for each test case. This task is to practice solving a problem with multiple datasets.  Write a program which reads an integer x and print it as is. Note that multiple datasets are given for this problem.

Incorrect submission (verdict: Wrong Answer):
i=1
while True:
    x = int(input())
    print("Case %d: %d" % (i,x))
    i+=1
    if x== 0 : break
    


Fixed, accepted submission:
i=0
while True:
    i+=1
    x = int(input())
    if x== 0 : break
    print("Case %d: %d" % (i,x))
Problem:
To become a millionaire, M-kun has decided to make money by trading in the next N days. Currently, he has 1000 yen and no stocks - only one kind of stock is issued in the country where he lives.  He is famous across the country for his ability to foresee the future. He already knows that the price of one stock in the next N days will be as follows:    * A_1 yen on the 1-st day, A_2 yen on the 2-nd day, ..., A_N yen on the N-th day.  In the i-th day, M-kun can make the following trade **any number of times** (possibly zero), **within the amount of money and stocks that he has at the time**.    * Buy stock: Pay A_i yen and receive one stock.   * Sell stock: Sell one stock for A_i yen.  What is the maximum possible amount of money that M-kun can have in the end by trading optimally?

Incorrect submission (verdict: Wrong Answer):
n = int(input())
a = list(map(int,input().split()))
dp = [0] * n
dp[0] = 1000
for i in range(1, n):
  dp[i] = max(dp[i-1], dp[i-1] // a[i-1] * a[i] + dp[i-1] % a[i-1])
print(dp[i-1])

Fixed, accepted submission:
n = int(input())
a = list(map(int,input().split()))
dp = [0] * n
dp[0] = 1000
for i in range(1, n):
  dp[i] = max(dp[i-1], dp[i-1] // a[i-1] * a[i] + dp[i-1] % a[i-1])
print(dp[-1])
Problem:
M-kun has the following three cards:    * A red card with the integer A.   * A green card with the integer B.   * A blue card with the integer C.  He is a genius magician who can do the following operation at most K times:    * Choose one of the three cards and multiply the written integer by 2.  His magic is successful if both of the following conditions are satisfied after the operations:    * The integer on the green card is **strictly** greater than the integer on the red card.   * The integer on the blue card is **strictly** greater than the integer on the green card.  Determine whether the magic can be successful.

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

Fixed, accepted submission:
a, b, c = map(int, input().split())
k = int(input())
while a >= b:
     k -= 1
     b *= 2
while b >= c:
     k -= 1
     c *= 2
print("Yes" if k >= 0 else "No")
Problem:
AtCoDeer the deer has found two positive integers, a and b. Determine whether the concatenation of a and b in this order is a square number.

Incorrect submission (verdict: Wrong Answer):
a,b = input().split()
ab = a+b

for i in range(320):
    if int(ab) == i**2:
        print('yes')
        break
else:
    print('No')

Fixed, accepted submission:
a,b = input().split()
ab = a+b

for i in range(4,320):
    if int(ab) == i**2:
        print('Yes')
        exit()
else:
    print('No')
Problem:
There are N + 1 squares arranged in a row, numbered 0, 1, ..., N from left to right.  Initially, you are in Square X. You can freely travel between adjacent squares. Your goal is to reach Square 0 or Square N. However, for each i = 1, 2, ..., M, there is a toll gate in Square A_i, and traveling to Square A_i incurs a cost of 1. It is guaranteed that there is no toll gate in Square 0, Square X and Square N.  Find the minimum cost incurred before reaching the goal.

Incorrect submission (verdict: Wrong Answer):
import numpy as np
import sys
N,M,X = map(int,input().split(" "))
A = list(map(int,input().split(" ")))
A = np.array(A)
# print(A)
test = (N+1)/2
count1 = np.where(A >= test)
count2 = np.where(A <= test)
# print(count1)
# print(len(count2))
# print("test")

if count1[0][0] == 0 and len(count1[0]) == 1:
    print(0)
    sys.exit()
elif count2[0][0] == 0 and len(count2[0]) == 1:
    print(0)
    sys.exit()

Fixed, accepted submission:
import numpy as np
import sys
N,M,X = map(int,input().split(" "))
A = list(map(int,input().split(" ")))
temp = []
ans1 = 0
ans2 = 0
for i in range(N+1):
    if (i == 0) or (i==N):
        temp.append(0)
    elif i in A:
        temp.append(1)
    # elif (i == 0) or (i==N):
    #     temp.append(0)
    else:
        temp.append(0)
for i in range(X,N+1):
    ans1 += temp[i]

for i in range(X):
    ans2 += temp[i]

print(min(ans1,ans2))
Problem:
Takahashi has a deposit of 100 yen (the currency of Japan) in AtCoder Bank.  The bank pays an annual interest rate of 1 % compounded annually. (A fraction of less than one yen is discarded.)  Assuming that nothing other than the interest affects Takahashi's balance, in how many years does the balance reach X yen or above for the first time?

Incorrect submission (verdict: Wrong Answer):
X = int(input())
year = 0
money = 100
while money > X:
  year += 1
  money = int(money*1.01)
  
print(int(year))

Fixed, accepted submission:
X = int(input())
year = 0
money = 100
while money < X:
  year += 1
  money = int(money*1.01)
  
print(int(year))