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 itemsAfter-tax price with 5% VATAfter-tax price with 8% VAT

    
20, 8021 + 84 = 10521 + 86 = 107

    
2, 992 + 103 = 1052 + 106 = 108

    
13, 8813 + 92 = 10514 + 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 &#8800; 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.
  

  
DatasetBefore-tax pricesAfter-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,899183+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



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


Sample output:
109
103
24
24
26
27
225
116
62
111
230
1972
508
1004
20
7

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
while True :
    x, y, s = map(int, input().split())
    if x == 0 :
        break
    
    else :
        S = s // 2 + 1
        # a < b と考える
        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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
while True:
    x, y, s = map(int, input().split())
    if x == 0: break
    
    def tax(p,x): #税抜き価格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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
import sys


from inspect import currentframe


def debug_print(s):
    # 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)

        # debug_key(sum_y)
        # debug_key(first_nuki)
        # debug_key(second_nuki)
        # debug_key((first_nuki * (100 + y)) // 100)
        # debug_key((second_nuki * (100 + y)) // 100)
        # debug((first_nuki * (100 + y)) // 100 + (second_nuki * (100 + y)) // 100)

    print(ans)
    return


if __name__ == '__main__':

    # a = [int(input()) for _ in range(244)]
    # b = [int(input()) for _ in range(244)]
    #
    # if a == b:
    #     debug("ok")
    # else:
    #     debug("(●・▽・●)")

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

        solve(x_input, y_input, s_input)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)
    #print(c,d)
    goukei=c+d
    kumi.append(goukei)
  print(max(kumi))

Submission status: Accepted

Solution code:

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

Submission status: Accepted

Solution code:
# Tax Rate Changed
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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())

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# coding: utf-8
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)

Submission status: Runtime Error

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

	fb = lambda z:z*(100+x)//100
	fa = lambda z:z*(100+y)//100

	ans = 0
	for A in range(1,s):
		for B in range(1,s):
			if fb(A)+fb(B) != s:
				continue
			ans = max(fa(A) + fa(B),ans)

	print(ans)

Submission status: Runtime Error

Solution code:
ret = []
while True:
	x,y,s = map(int,input().split(" "))
	if x == 0 and y == 0 and s == 0:
		break

	fb = lambda z:z*(100+x)//100
	fa = lambda z:z*(100+y)//100

	ans = 0
	for A in range(1,s):
		for B in range(1,s):
			if fb(A)+fb(B) != s:
				continue
			ans = max(fa(A) + fa(B),ans)

	ret.append(ans)

for ans in ret:
	print(ans)

Submission status: Runtime Error

Solution code:
while True:
    x, y, s = map(int, input().split())
    if x==0 and y==0 and s==0:
        break
    else:
        value = 0
        for a in range(1, s):
            for b in range(1, s):
                if int(a*(100+x)/100) + int(b*(100+x)/100) == s:
                    v = int(a*(100+y)/100) + int(b*(100+y)/100)
                    print(a,b)
                    if value < v:
                        value = v
        print(value)

Submission status: Runtime Error

Solution code:
while True:
    x, y, s = map(int, input().split())
    if x==0 and y==0 and s==0:
        break
    else:
        value = 0
        for a in range(1, s):
            for b in range(1, s):
                if int(a*(100+x)/100) + int(b*(100+x)/100) == s:
                    v = int(a*(100+y)/100) + int(b*(100+y)/100)
                    if value < v:
                        value = v
        print(value)

Submission status: Runtime Error

Solution code:
while True:
    x, y, s = map(int, input().split())
    if x==0 and y==0 and s==0:
        break
    else:
        value = 0
        for a in range(1, s):
            for b in range(1, s-a+1):
                if int(a*(100+x)/100) + int(b*(100+x)/100) == s:
                    v = int(a*(100+y)/100) + int(b*(100+y)/100)
                    if value < v:
                        value = v
                    break
        print(value)

Submission status: Runtime Error

Solution code:
#include <iostream>
using namespace std;

int main(void){
  int x, y, s, i, j;
  int tmp, higher;
  while(cin>>x>>y>>s){
    if(x == 0){
      break;
    }
    higher = 0;
    for(i=1;i<s;i++){
      for(j=i;j<s;j++){
        if(i * (100 + x) / 100 + (j * (100 + x) / 100) == s){
          tmp = i * (100 + y) / 100 + j * (100 + y) / 100;
          higher = max(higher, tmp);
        }
      }
    }
    cout<<higher<<endl;
  }
  return 0;
}

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x)//100
def solve(X, Y, S):
    max_value=0 #max_valueをdef solveの前に入れるミスをしていて全く進みませんでした。関数の定義の理解が進みました。
    for a in range(1,S):
        for b in range(1,S):
            sum_value=tax(a,X)+tax(b,X)
            if sum_value==S:
                c=tax(a,Y)+tax(b,Y)
                if c>=max_value:
                    max_value=c
                if sum_value>S:　#bが増加すれば必ずSが増加することを使っていて、なるほどと思いました。
                    break
    return max_value

while True:
    X,Y,Z=map(int, input().split())
    if X==0:
        break
    print(solve(X,Y,Z))
#リダイレクションのやり方がわかりませんでした

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x)//100
def solve(X, Y, S):
    max_value=0 
    for a in range(1,S):
        for b in range(1,S):
            sum_value=tax(a,X)+tax(b,X)
            if sum_value==S:
                c=tax(a,Y)+tax(b,Y)
                if c>=max_value:
                    max_value=c
                if sum_value>S:　
                    break
    return max_value

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x)//100
def solve(X, Y, S):
    max_value=0
    for a in range(1,S):
        for b in range(1,S):
            sum_value=tax(a,X)+tax(b,X)
            if sum_value==S:
                c=tax(a,Y)+tax(b,Y)
                if c>max_value:
                    max_value=c
                if sum_value>S:　
                    break
    return max_value

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100 # 整数除算

def solve(X,Y,S):
    ans = 0
    oldsum = 0
    for a in range(1,S):
        for b in range(1,S-a+1): #税抜き価格a,bの総和はS以下である
            oldsum = tax(a,X)+tax(b,X) #税制改定前の税込合計額
            if oldsum == S: # 新税でのtax(a,Y)+tax(b,Y) について検討 
                newsum = tax(a,Y)+tax(b,Y) 
                if newsum > ans:
                    ans =newsum
            if oldsum > S:
                break # b増加ならばsum増加のため
    return(ans)

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100 # 整数除算

def solve(X,Y,S):
    ans = 0
    oldsum = 0
    for a in range(1,S):
        for b in range(1,S-a+1): #税抜き価格a,bの総和はS以下である
            oldsum = tax(a,X)+tax(b,X) #税制改定前の税込合計額
            if oldsum == S: # 新税でのtax(a,Y)+tax(b,Y) について検討 
                newsum = tax(a,Y)+tax(b,Y) 
                if newsum > ans:
                    ans =newsum
            if oldsum > S:
                break # b増加ならばsum増加のため
    return(ans)

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100 # 整数除算

def solve(X,Y,S):
    ans = 0
    oldsum = 0
    newsum = 0
    for a in range(1,S):
        for b in range(1,S-a+1): #税抜き価格a,bの総和はS以下である
            oldsum = tax(a,X)+tax(b,X) #税制改定前の税込合計額
            if oldsum == S: # 新税でのtax(a,Y)+tax(b,Y) について検討 
                newsum = tax(a,Y)+tax(b,Y) 
                if newsum > ans:
                    ans =newsum
            if oldsum > S:
                break # b増加ならばsum増加のため
    return ans

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100
def solve(X,Y,S):
    for a in range(1,S):
        for b in range(1,S):
            sum = tax(a,X)+tax(b,X)
            if sum == S:
                tax(a,Y)+tax(b,Y) 
            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))

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100
def solve(X,Y,S):
    for a in range(1,S):
        for b in range(1,S):
            sum = tax(a,X)+tax(b,X)
            if sum == S: 
            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))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
def tax(p,x):
    return p*(100+x) // 100
def solve(X,Y,S):
    for a in range(1,S):
        for b in range(1,S-a+1):
            sum = tax(a,X)+tax(b,X)
            if sum == S:
                NS = tax(a,Y)+tax(b,Y)
                if newsum > ans:
                    A = NS
            if sum > S:
                break
    return A 
while True:
    X,Y,S = map(int, input().split()) 
    if X == 0:
        break
    print(solve(X,Y,S))

Submission status: Runtime Error

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

Submission status: Runtime Error

Solution code:
eps = 0.00000001
while True:
    x, y, s = map(int, input().split())
    if x == 0:
        break
    x /= 100
    y /= 100
    n = 0
    for a in range(1, s):
        for b in range(1, s):
            if (int)(a * (1 + x) + eps) + (int)(b * (1 + x) + eps) == s:
                n = max(n, (int)(a * (1 + y) + eps) + (int)(b * (1 + y) + eps))
    print(n)

Submission status: Runtime Error

Solution code:
eps = 0.00000001
while True:
    x, y, s = map(int, raw_input().split())
    if x == 0:
        break
    x /= 100.0
    y /= 100.0
    n = 0
    for a in range(1, s):
        for b in range(1, s):
            if (int)(a * (1 + x) + eps) + (int)(b * (1 + x) + eps) == s:
                n = max(n, (int)(a * (1 + y) + eps) + (int)(b * (1 + y) + eps))
    print(n)