Problem:
Tax Rate Changed VAT (value-added tax) is a tax imposed at a certain rate proportional to the sale price. Our store uses the following rules to calculate the after-tax prices.  When the VAT rate is x %,
	for an item with the before-tax price of p yen,
	its after-tax price of the item is p (100+ x ) / 100 yen, fractions rounded off.  The total after-tax price of multiple items paid at once is
	the sum of after-tax prices of the items.  The VAT rate is changed quite often.
    Our accountant has become aware that
    "different pairs of items that had the same total after-tax price
    may have different total after-tax prices after VAT rate changes."
    For example, when the VAT rate rises from 5% to 8%,
    a pair of items that had the total after-tax prices of 105 yen before
    can now have after-tax prices either of 107, 108, or 109 yen, as shown in the table below.   Before-tax prices of two items After-tax price with 5% VAT After-tax price with 8% VAT  20, 80 21 + 84 = 105 21 + 86 = 107  2, 99 2 + 103 = 105 2 + 106 = 108  13, 88 13 + 92 = 105 14 + 95 = 109   Our accountant is examining effects of VAT-rate changes on after-tax prices.
    You are asked to write a program that calculates the possible maximum
    total after-tax price of two items with the new VAT rate,
    knowing their total after-tax price before the VAT rate change. Input The input consists of multiple datasets.
    Each dataset is in one line,
    which consists of three integers x , y , and s separated by a space. x is the VAT rate in percent before the VAT-rate change, y is the VAT rate in percent after the VAT-rate change,
    and s is the sum of after-tax prices of two items before the VAT-rate change.
    For these integers, 0 < x < 100, 0 < y < 100,
    10 < s < 1000, and x ≠ y hold.
    For before-tax prices of items, all possibilities of 1 yen through s -1 yen should be considered. The end of the input is specified by three zeros separated by a space. Output For each dataset,
    output in a line the possible maximum total after-tax price when the VAT rate is changed to y %. Sample Input 5 8 105
8 5 105
1 2 24
99 98 24
12 13 26
1 22 23
1 13 201
13 16 112
2 24 50
1 82 61
1 84 125
1 99 999
99 1 999
98 99 999
1 99 11
99 1 12
0 0 0 Output for the Sample Input 109
103
24
24
26
27
225
116
62
111
230
1972
508
1004
20
7 Hints In the following table,
    an instance of a before-tax price pair that has the maximum after-tax price after the VAT-rate change
    is given for each dataset of the sample input.  Dataset Before-tax prices After-tax price with y % VAT  5 8 105  13, 88 14 + 95 = 109  8 5 105  12, 87 12 + 91 = 103  1 2 24  1, 23 1 + 23 =  24  99 98 24  1, 12 1 + 23 =  24  12 13 26  1, 23 1 + 25 =  26  1 22 23  1, 22 1 + 26 =  27  1 13 201  1,199 1 +224 = 225  13 16 112 25, 75 29 + 87 = 116  2 24 50  25, 25 31 + 31 =  62  1 82 61  11, 50 20 + 91 = 111  1 84 125  50, 75 92 +138 = 230  1 99 999  92,899 183+1789 =1972  99 1 999  1,502 1 +507 = 508  98 99 999 5,500 9 +995 =1004  1 99 11  1, 10 1 + 19 =  20  99 1 12  1,  6 1 +  6 =   7

Solution (Python):
while True:
    x,y,s=map(int, input().split())
    if x==0 and y==0 and s==0:
        break
        
    b=0
    for i in range(1,s):
        for j in range(1,i+1):
             if i*(100+x)//100 + j*(100+x)//100 ==s:
                k=i*(100+y)//100 + j*(100+y)//100
                b=max(b,k)
    print(b)

Solution (Python):
while True:
  x,y,s=map(int,input().split())
  if x==0:
   break

  max=0
  for i in range(1,s):
      for j in range(i,s+1):
          mae=i*(100+x)//100+j*(100+x)//100
          if mae==s:
             ato=i*(100+y)//100+j*(100+y)//100
             if ato>max:
                max=ato
            
  print(max)

Solution (Python):
while True:
    x,y,s=map(int,input().split())
    if x==0 and y==0 and s==0:
        break
        
    ans=0
    for a in range(1,s):
        for b in range(1,a+1):
            S1=(a*(100+x)//100)+(b*(100+x)//100)
            if S1==s:
                S2=(a*(100+y)//100)+((b*(100+y)//100))
                ans=max(ans,S2)
    print(ans)

Solution (Python):
while True:
    x, y, s = map(int , input().split())
    if x == 0 and y == 0 and s == 0:
        break
    else:
        l = []
        for i in range(1, s):
            for j in range(1, i + 1):
                p = i * (100 + x) // 100 + j * (100 + x) // 100
                if p == s:
                    l.append(i * (100 + y) // 100 + j * (100 + y) // 100)
        print(max(l))

Solution (Python):
import math
while True:
  max_price=0
  x,y,s=map(int,input().split())
  if x==y==s==0:
    break
  else:
    for i in range(1,s//2 + 1):
      p_1=math.floor(i*(100+x)/100) 
      z=s-p_1         
      ori_z=math.ceil(z*100/(100+x))
      if math.floor(ori_z *(100+x)/100)+p_1 ==s:
          neo_i=math.floor(i*(100+y)/100)
          neo_z=math.floor(ori_z*(100+y)/100)
          neo_sum=neo_i+neo_z
          if neo_sum > max_price:
            max_price=neo_sum
    print(max_price)

Solution (Python):
def tax(p,x):
    return p*(100+x)//100

while True:
    x,y,s=map(int,input().split())
    if x==y==s==0: 
        break
    sm=0
    for i in range(1,s):
        for j in range(i,s):
            if tax(i,x)+tax(j,x)==s:
                if sm<tax(i,y)+tax(j,y):
                    sm=tax(i,y)+tax(j,y)
    print(sm)

Solution (Python):
while True:
    x,y,s=map(int,input().split())
    
    if x==0 and y==0 and s==0:
        break
    ans = []
    for i in range(1,s):
        for j in range(1,i+1):
            
            a = i * (100 + x) // 100 + j * (100 + x) // 100
        
            if a == s:
                b = i * (100 + y) // 100 + j * (100 + y) // 100
                ans.append(int(b))
    
    print(max(ans))

Solution (Python):
import math

while True:
    data = input().split()
    x,y,s = int(data[0]),int(data[1]),int(data[2])
    if x == 0 and y == 0 and s == 0: break
    b_tax = (100+x)/100
    a_tax = ((100+y)/100)
    eps = 0.000000001
    maxSumPrice = 0
    for p1 in range(1,s):
        for p2 in range(p1,s):
            sumPrice = math.floor(p1*b_tax + eps) + math.floor(p2*b_tax + eps)
            if sumPrice == s:
                sumPrice_aTaxin = math.floor(p1*a_tax + eps) + math.floor(p2*a_tax + eps)
                maxSumPrice = max(maxSumPrice,sumPrice_aTaxin)
    print(maxSumPrice)

Solution (Python):







def calcZeikomi(zeinuki, zeiritsu):
    return zeinuki + zeinuki * zeiritsu // 100










def calcZeinukiMinimum(zeikomi, zeiritsu):
    for i in range(1, zeikomi + 1):
        if (calcZeikomi(i, zeiritsu) == zeikomi):
            return i
    return None











def calcZeinukiMaximum(zeikomi, zeiritsu):
    for i in range(zeikomi, 0, -1):
        if (calcZeikomi(i, zeiritsu) == zeikomi):
            return i
    return None









def calcKaiteiMaximum(rate0, rate1, price0):
    zeinuki = calcZeinukiMaximum(price0, rate0)
    if (zeinuki == None):
        return None
    return calcZeikomi(zeinuki, rate1)









def solve(x, y, s):
    res = 0
    for i in range(1, s):
        price1 = calcKaiteiMaximum(x, y, i)
        price2 = calcKaiteiMaximum(x, y, s - i)
        if (price1 == None or price2 == None):
            continue
        res = max(res, price1 + price2)
    return res


while (True):
    ary = input().split()
    x = int(ary[0])
    y = int(ary[1])
    s = int(ary[2])
    if (x == 0 and y == 0 and s == 0):
        break
    print(solve(x, y, s))

Solution (Python):
while True:
    x, y, s = map(int, input().split())
    
    if x==0 and y==0 and s==0:
        break
    
    List = list(range(1,s))
    
    if s%2==1:
        a = int((s-1)/2)
        c = s-1
        table = List[a:c]
        del(List[a:c])
    
    if s%2==0:
        b = int(s/2)
        c = s-1
        table = List[b:c]
        del(List[b:c])
    
    for i in range(len(table)-1,-1,-1):
        List.append(table[i])
    L = len(List)
    
    for i in range(L):
        p = List[i]/(1+(x/100))
        if p%1==0:
            List.pop(i)
            List.insert(i,int(p))
        if p%1>0 :
            q = int(p)+1
            if int((q*(100+x))//100) == int(List[i]) :
                List.pop(i)
                List.insert(i,q)
            else:
                List.pop(i)
                List.insert(i,0)
    if s%2==0:
        List.append(List[b-1])
    
    LIST = []
    
    if s%2==1:
        for i in range(a):
            if List[i]==0 or List[i+a]==0:
                continue
            else:
                sum = int((List[i]*(100+y))//100) + int((List[i+a]*(100+y))//100)
                LIST.append(sum)
    
    if s%2==0:
        for i in range(b):
            if List[i]==0 or List[i+b]==0:
                continue
            else:
                sum = int((List[i]*(100+y))//100) + int((List[i+b]*(100+y))//100)
                LIST.append(sum)
    print(max(LIST))

Solution (Python):
while True :
    x, y, s = map(int, input().split())
    if x == 0 :
        break
    
    else :
        S = s // 2 + 1
        
        c = 0
        
        
        for i in range(1, s - 1) :
            a = i * (100 + x) // 100
            
            
            if(a <= S) :
                for j in range(1, s - 1) :
                    b = j * (100 + x) // 100
                    
                    if(s == a + b) :
                        A = i * (100 + y) // 100
                        
                        B = j * (100 + y) // 100
                        
                        if(A + B > c) :
                            c = A + B
            
            else :
                break
            
        print(c)

Solution (Python):
while True:
    x,y,s=map(int,input().split())
    if s==0:
        break
    else:
        p=0
        for i in range(1,s+1):
            for j in range(i,s+1):
                t=i+j+(i*x)//100+(j*x)//100
                if t>s:
                    break
                if t!=s:
                    continue
                t=i+j+(i*y)//100+(j*y)//100
                if t>p:
                    p=t
        print(p)

Solution (Python):
while True:
    x, y, s = map(int, input().split())
    if x == 0: break
    
    def tax(p,x): 
        return p * (100 + x) // 100
    
    def solve(X,Y,S):
        max = 0
        for a in range(1,S):
            for b in range(1,S):
                sum = tax(a,X) + tax(b,X)
                if sum == S:
                    if tax(a,Y) + tax(b,Y) > max:
                        max = tax(a,Y) + tax(b,Y)
                if sum > S:
                    break
        return max
    
    print(solve(x,y,s))

Solution (Python):
def tax(p, rate):
    return p * (100 + rate) // 100

def solve(X, Y, S):
    best = 0
    for a in range(1, S):
        for b in range(1, S):
            sum = tax(a, X) + tax(b, X)
            if sum == S:
                pr = tax(a, Y) + tax(b, Y)
                if pr > best:
                    best = pr
            if sum > S:
                break
    return best

while True:
    x, y, s = map(int, input().strip().split(' '))
    if x == 0:
        break
    print(solve(x, y, s))

Solution (Python):
def tax(p,x):
    return x * (100+p) // 100
def solve(p,q,x):
    ans = 0
    m = (x * 100) // (100 + p)
    for i in range(m,x+1): 
        for j in range(1, i // 2 + 1): 
            k = i - j 
            if tax(p,j) + tax(p,k) == x:
                ans = max(ans,tax(q,j) + tax(q,k))
    return print(ans)
while True:
    p, q, x = map(int, input().split())
    if (p, q, x) == (0, 0, 0):
        break
    solve(p, q, x)

Solution (Python):
def tax(p,x):
    return p*(100 + x)//100
    
def solve(x,y,s):
    ans = 0
    for i in range(1,s):
        for j in range(1,s):
            tot = tax(i,x) + tax(j,x)
            if tot == s:
                ans = max(ans,tax(i,y) + tax(j,y))
            elif tot > s:
                break
    print(ans)

def main():
    while True:
        x,y,s = map(int,input().split())
        if s == 0:
            return
        solve(x,y,s)
if __name__ == '__main__':
    main()

Solution (Python):
import math
def tax(p,x):
    return p*(100+x) // 100 


def main(x,y,s):
    maxV=0
    for i in range(1,s):
        for j in range(1,s):
            if tax(i,x)+tax(j,x)==s:
                maxV=max(maxV,tax(i,y)+tax(j,y))
            elif tax(i,x)+tax(j,x)> s:
                break
    return maxV

while True:
    x,y,s = map(int,input().split())
    if x==0:
        break
    print(main(x,y,s))

Solution (Python):
def tax(p,x):
    return p*(100+x) // 100
def solve(X,Y,S):
    best = 0
    for a in range(1,S):
        for b in range(1,S):
            sum = tax(a,X)+tax(b,X)
            if sum == S:
                new = tax(a,Y)+tax(b,Y)
                best = max(best,new)
            if sum > S:
                break
    return best
while True:
    X,Y,S = map(int, input().strip().split( ))
    if X == 0:
        break
    print(solve(X,Y,S))

Solution (Python):
while 1:
	a, b, c = map(int, input().split())
	if a == 0: break
	ans = 0
	for p1 in range(1, c+1):
		for p2 in range(p1, c+1):
			t = p1 + p2 + (p1*a)//100 + (p2*a)//100
			if t > c: break
			if t != c: continue
			t = p1 + p2 + (p1*b)//100 + (p2*b)//100
			if t > ans: ans = t
	print(ans)

Solution (Python):
while 1:
        x,y,s = map(int,input().split())
        if x == 0 and y == 0 and s == 0:
            break
        Max = -9999999999
        py = (y / 100) + 1
        for p1 in range(1,s):
            for p2 in range(p1,s):
                p1_tax = p1*(100+x) // 100
                p2_tax = p2*(100+x) // 100
                if (p1_tax+p2_tax) == s:
                    p1_tax_y = p1*(100+y) // 100
                    p2_tax_y = p2*(100+y) // 100
                    Max = max(Max,p1_tax_y+p2_tax_y)
        print(Max)

Solution (Python):
import sys
input = sys.stdin.readline

def f(a,b,x,y):
    aa,bb = -1,-1
    
    for i in range(1000,0,-1):
        if i*(100+x)//100 == a:
            aa = i
            break
    for i in range(1000,0,-1):
        if i*(100+x)//100 == b:
            bb = i
            break     
    if aa == -1 or bb == -1:
        return 0

    return aa*(100+y)//100 + bb*(100+y)//100

while True:
    x,y,s = map(int,input().split())
    if (x,y,s) == (0,0,0):
        exit()
    
    res = 0
    for a in range(1,s):
        b = s - a
        res = max(res,f(a,b,x,y))
    print(res)

Solution (Python):
import math


def get_input():
    input_data = input().split()
    return input_data

def get_max_num(before_tax, after_tax, before_sum):
    max_num = 0
    length = (before_sum // 2) + 2
    for num_1 in range(1, length):
        num_2 = before_sum - num_1
        num_1 = math.floor(((num_1+1) / before_tax) * 100)
        num_2 = math.floor(((num_2+1) / before_tax) * 100)
        if math.floor((num_1 * before_tax) / 100) + math.floor((num_2 * before_tax) / 100) == before_sum:
            tmp_num = math.floor(num_1 * after_tax / 100) + math.floor(num_2 * after_tax / 100)
            if tmp_num >= max_num:
                max_num = tmp_num
    return max_num






if __name__ == "__main__":
    while True:
        input_data = get_input()
        if input_data[0] == "0":
            break
        before_tax = (100 + int(input_data[0]))
        after_tax = (100 + int(input_data[1]))
        before_sum = int(input_data[2])
        max_num = get_max_num(before_tax, after_tax, before_sum)
        print(max_num)

Solution (Python):
from math import ceil, floor

while 1:
    x,y,s = map(int,input().split())
    if x==0: break
    a = []
    for i in range(1, s):
        p1 = ceil(i/(1+x/100)-0.00001)
        if floor(p1*(1+x/100)+0.00001) != i:
            continue
        p2 = ceil((s-i) / (1 + x / 100) - 0.00001)
        if floor(p2 * (1 + x / 100)+0.00001) != (s-i):
            continue
        a.append(floor(p1*(1+y/100)+0.00001) + floor(p2*(1+y/100)+0.00001))
    print(max(a))

Solution (Python):
while True:
    x,y,s = map(int,input().split())
    if x == 0:
        break
    ans = 0
    for i in range(1,s+1):
        for j in range(i,s+1):
            komi_mae = i * (100 + x) // 100 + j * (100 + x) // 100
            if komi_mae == s:
                komi_now = i * (100 + y) // 100 + j * (100 + y) // 100
                ans = max(ans,komi_now)
    print(ans)

Solution (Python):
import sys


from inspect import currentframe


def debug_print(s):
    
    return 


def debug_key(*args):
    names = {id(v): k for k, v in currentframe().f_back.f_locals.items()}
    debug_print(', '.join(names.get(id(arg), '???')+' = '+repr(arg) for arg in args))


def solve(x, y, s):
    debug_print("\n-----solve-----")
    ans = 0
    for first in range(1, s // 2 + 1):
        second = s - first
        first_nuki = (first + 1) / (x + 100) * 100
        second_nuki = (second + 1) / (x + 100) * 100

        if first_nuki.is_integer():
            first_nuki -= 1
        else:
            first_nuki = int(first_nuki)

        if second_nuki.is_integer():
            second_nuki -= 1
        else:
            second_nuki = int(second_nuki)

        if (int((first_nuki * (100 + x)) / 100) + int((second_nuki * (100 + x)) / 100)) != s:

            continue

        sum_y = int((first_nuki * (100 + y)) / 100) + int((second_nuki * (100 + y)) / 100)
        ans = max(ans, sum_y)

        
        
        
        
        
        

    print(ans)
    return


if __name__ == '__main__':

    
    
    
    
    
    
    

    while True:
        x_input, y_input, s_input = map(int, input().split())
        
        if x_input == y_input == s_input == 0:
            break

        solve(x_input, y_input, s_input)

Solution (Python):
while True:
 x, y, s = map(int,input().split())
 lst=[]
 if x==0 and y==0 and s==0:
   break
 for i in range(1, s):
   for j in range(1, s):
     if (i*(100+x)//100) + (j*(100+x)//100) == s:
       lst.append((i*(100+y)//100) + (j*(100+y)//100))
 print(max(lst))

Solution (Python):
def main(x, y, s):
    ans = []
    for i in range(1, s):
        for k in range(1, s):
            if i + (x * i) // 100 + k + (k * x) // 100 == s:
                ans.append((i, k))
    tmp = 0
    for i, k in ans:
        tmp = max(tmp, i + (y * i) // 100 + k + (k * y) // 100)
    print(tmp)


while 1:
    x, y, s = map(int, input().split())
    if x == y == s == 0:
        break
    main(x, y, s)

Solution (Python):
while True:
  x,y,s=map(int,input().split())
  if x==0 and y==0 and s==0:
    break
  A=[]
  B=[]
  for i in range(1,s):
    a=int(i*(100+x)/100)
    for j in range(i,s):
      b=int(j*(100+x)/100)
      if a+b==s:
        A.append(i)
        B.append(j)
      if (a+b)>s:
        break
  kumi=[]
  for i in range(len(A)):
    c=int(A[i]*(100+y)/100)
    d=int(B[i]*(100+y)/100)
    
    goukei=c+d
    kumi.append(goukei)
  print(max(kumi))

Solution (Python):

while True:
  x, y, s = map(int,input().split())
  lst=[]
  if x==0 and y==0 and s==0:
    break
  for i in range(1, s):
    for j in range(1, s):
      if (i*(100+x)//100) + (j*(100+x)//100) == s:
        lst.append((i*(100+y)//100) + (j*(100+y)//100))
  print(max(lst))

Solution (Python):

import math
ans = []


def tax(p, x):
    return p * (100 + x) // 100

while True:
    x, y, s = map(int, input().split())
    if x == 0 and y == 0 and s == 0:
        break
    max_price = []
    for i in range(1, s):
        for j in range(i, s):
            if tax(i, x) + tax(j, x) == s:
                max_price.append(tax(i, y) + tax(j, y))

    ans.append(max(max_price))

for i in ans:
    print(i)

Solution (Python):
x = 1

while x != 0:
    x,y,z = map(int, input().split(" "))
    ans = 0
    for i in range (1,z):
        for j in range(i,z):
            if int(i*(100+x)/100)+int(j*(100+x)/100) == z:
                ans = max(int(i*(100+y)/100)+int(j*(100+y)/100),ans)
    if x != 0:
        print(ans)

Solution (Python):
while True:
    x, y, s = map(int, input().split())
    if x == 0: break
    ans = 0
    for p1 in range(1, s+1):
        for p2 in range(p1, s+1):
            t = p1 + p2 + (p1*x)//100 + (p2*x)//100
            if t > s: break
            if t != s: continue
            t = p1 + p2 + (p1*y)//100 + (p2*y)//100
            if t > ans: ans = t
    print(ans)

Solution (Python):
a,b,c = map(int,input().split())
while (a!=0) or (b!=0) or (c!=0):
    ans = 0
    for i in range(1,c):
        j = c - i
        ori_i,ori_j = 0,0
        for i_ori in range(1,i+1):
            if int(i_ori*(100+a)/100)==i:
                ori_i = max(ori_i,i_ori)
        for j_ori in range(1,j+1):
            if int(j_ori*(100+a)/100)==j:
                ori_j = max(ori_j,j_ori)
        ans = max(ans,int(ori_i*(100+b)/100)+int(ori_j*(100+b)/100))
        
    print(ans)
    a,b,c = map(int,input().split())

Solution (Python):
def tax(p,x):
  return p*(100+x)//100
def highest(x,y,s):
  best = 0
  for i in range(1,s):
    for j in range(1,s):
      k = tax(i,x)+tax(j,x)
      if k == s:
        if best <= tax(i,y)+tax(j,y):
          best = tax(i,y)+tax(j,y)
  return best
while True:
  x,y,s = map(int,input().split())
  if x == y == s == 0:
    break
  print(highest(x,y,s))

Solution (Python):
def tax(p,x):
    return p*(100+x)//100
def solve(X,Y,S):
    max = 0
    for a in range(1,S):
        for b in range(1,S):
            sum = tax(a,X)+tax(b,X)
            if sum == S:
                if max < tax(a,Y) + tax(b,Y):
                    max = tax(a,Y) + tax(b,Y)
            if sum > S:
                    break
    return max

while True:
    X,Y,S = map(int,input().split())
    if X == 0:
        break
    print(solve(X,Y,S))

Solution (Python):
def tax(p,x):
    return p*(100+x)//100
def solve(x,y,s):
    l=[]
    for i in range(1,s):
        for j in range(1,s):
            if tax(i,x)+tax(j,x)==s:
                l.append(tax(i,y)+tax(j,y))
            if  tax(i,x)+tax(j,x)>s:
                break
    print(max(l))
while True:
    a,s,d=map(int,input().split())
    if a==0 and s==0 and d==0:
        break
    solve(a,s,d)

Solution (Python):
def tax(p,x):
    return x*(100+p)//100
def solve(p1,p2,s):
    maximum = 0
    for i in range(1,s+1):
        for j in range(i,s+1):
            if tax(p1,i)+tax(p1,j)==s:
                after = tax(p2,i)+tax(p2,j)
                if after >maximum:
                    maximum = after
    return maximum
while True:
    p1,p2,s=map(int,input().split())
    if p1==0:
        break
    print(solve(p1,p2,s))

Solution (Python):
while True:
    x, y, s = map(int, input().split())
    if x == 0 and y == 0 and s == 0:
        break
    maxsum = 0
    for one in range(1, s):
        for two in range(1, s):
            if one*(100+x)//100 + two*(100+x)//100 == s:
                maxsum = max(maxsum, one*(100+y)//100 + two*(100+y)//100)
    print(maxsum)

Solution (Python):
while True:
  x, y, s = map(int, input().split())
  if x == 0:
    break
  ans = 0
  for i in range(1, s+1):
    for j in range(i, s+1):
      t = i + j + (i*x)//100 + (j*x)//100
      if t > s:
        break
      if t != s:
        continue
      t = i + j + (i*y)//100 + (j*y)//100
      if t > ans:
        ans = t
  print(ans)

Solution (Python):
while True:
    x,y,s = map(int,input().strip().split(" "))
    if [x,y,s] == [0,0,0]:   
        break
    S = []
    M = 0
    for i in range(1,s//2+1):
        for j in range(1,s-i+1):
            if  (i*(100+x)//100) + (j*(100+x)//100) == s:
                t = (i*(100+y)//100) + (j*(100+y)//100)
                if t > M:
                    M = t
    print(M)

Solution (Python):
def tax(p,x):
    return p*(100+x)//100

while True:
    sum=0
    x,y,s=map(int,input().strip().split(' '))
    if x==0 and y==0 and s==0:
        break
    for i in range(1,s-1):
        for j in range(i,s-1):
            if i+j>s:
                break
            if tax(i,x)+tax(j,x)>s:
                break
            if tax(i,x)+tax(j,x)==s:
                if tax(i,y)+tax(j,y)>sum:
                    sum = tax(i,y) + tax(j,y)
    print(sum)

Solution (Python):

while 1:
    x,y,s=map(int,input().split())
    if s==0:
        break
    ans=0
    for i in range(1,s):
        for j in range(i,s):
            sumx=i*(100+x)//100 + j*(100+x)//100
            if sumx==s:
                sumy = i*(100+y)//100 + j*(100+y)//100
                ans=max(ans,sumy)
    print(ans)