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 
...(truncated)

Submitted solutions:

code_snippet: #include <cstdio>
#include <algorithm>

using namespace std;

int main(void) {
	int x, y, s;
	while(scanf("%d %d %d", &x, &y, &s), !(x == 0 and y == 0 and s == 0)) {
		int ans = 0;

		for(int i = 1; i < s; i++) {
			int j = s - i;
			int xcost = 0;
			while(xcost * (100 + x) / 100 <= i) xcost++;
			xcost--;
			int ycost = 0;
			while(ycost * (100 + x) / 100 <= j) ycost++;
			ycost--;

			if(xcost * (100 + x) / 100 + ycost * (100 + x) / 100 != s) continue;

			int cand = xcost * (100 + y) / 100 + ycost * (100 + y) / 100;
			if(cand > ans) {
				ans = cand;
			}
		}

		printf("%d\n", ans);
	}

	return 0;
}
accuracy: 1
time_ms: 40
memory_kb: 2944
final_rank: 1

code_snippet: //Q:https://judge.u-aizu.ac.jp/onlinejudge/description.jsp?lang=jp&id=1192

#include <bits/stdc++.h>
using namespace std;

int main(){
    int x, y, s;
    while (cin >> x >> y >> s) {
        if (x == 0 && y == 0 && s == 0) break;
        int ma = 0;
        for (int a = 1; a < s; a++) {
            for (int b = 1; b < s; b++){
                int ta = a * (100 + x) / 100;
                int tb = b * (100 + x) / 100;
                if (ta + tb == s) {
                    int na = a * (100 + y) / 100;
                    int nb = b * (100 + y) / 100;
                    ma = max(ma, na + nb);
                }
                }   
        }
        cout << ma << endl;
    }
}
accuracy: 1
time_ms: 60
memory_kb: 3356
final_rank: 13

code_snippet: #include <iostream>
#include <cassert>
using namespace std;
using ll = long long;
template<class T> inline bool chmax(T& a, const T& b) {if (a<b) {a=b; return true;} return false;}
template<class T> inline bool chmin(T& a, const T& b) {if (b<a) {a=b; return true;} return false;}
constexpr int INTINF = 1000001000;
constexpr int INTMAX = 2147483647;
constexpr ll LLMAX = 9223372036854775807;
constexpr ll LLINF = 4450000000011100000;

int calc(int p, int x) {
  return p * (100 + x) / 100;  
}

void solve(int x, int y, int s) {
  int ans = 0;
  // s: 税率がx%のときの税込み合計額
  // s = floor(p * (100+x) / x) + floor(
  for (int s1=1; s1<=s-1; s1++){
    for (int s2=1; s2<=s-1; s2++) {
      if (calc(s1,x) + calc(s2,x) != s) continue;
      chmax(ans, calc(s1,y) + calc(s2,y));
    }
  }
  cout << ans << endl;
}

int main() {
  ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
  while(true) {
    int x, y, s; cin >> x >> y >> s;
    if (x==0 && y == 0 && s == 0) break;
    solve(x,y,s);
  }
  return 0;
}
accuracy: 1
time_ms: 60
memory_kb: 3456
final_rank: 15

code_snippet: #include <bits/stdc++.h>
#include <atcoder/all>
using namespace std;
using namespace atcoder;
#define int long long

void solve(int x, int y, int s) {
    int mx = 0;
    for (int i=1; i<s; ++i) {
        for (int j=1; j<s; ++j) {
            int before = i*(100+x)/100 + j*(100+x)/100;
            if (before != s) continue;
            int after = i*(100+y)/100 + j*(100+y)/100;
            mx = max(mx, after);
        }
    }
    cout << mx << endl;
}

signed main() {
    ios::sync_with_stdio(false);cin.tie(nullptr);
    while(true) {
        int x, y, s;
        cin >> x >> y >> s;
        if (x+y+s == 0) break;
        solve(x, y, s);
    }
}

/*
memo

*/
accuracy: 1
time_ms: 60
memory_kb: 3584
final_rank: 17

code_snippet: // This is free and unencumbered software released into the public domain.

// Anyone is free to copy, modify, publish, use, compile, sell, or
// distribute this software, either in source code form or as a compiled
// binary, for any purpose, commercial or non-commercial, and by any
// means.

// In jurisdictions that recognize copyright laws, the author or authors
// of this software dedicate any and all copyright interest in the
// software to the public domain. We make this dedication for the benefit
// of the public at large and to the detriment of our heirs and
// successors. We intend this dedication to be an overt act of
// relinquishment in perpetuity of all present and future rights to this
// software under copyright law.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
// IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
// OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
// ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
// OTHER DEALINGS IN THE SOFTWARE.

// For more information, please refer to <http://unlicense.org>

/****************/
/* template.hpp */
/****************/

#include <cassert>
#include <iomanip>
#include <iostream>
#include <limits>

using namespace std;


template <typename T> void debug(T x) {
  cerr << __LINE__ << " " << var_name(x) << " " << (x) << endl;
}

template <typename T> void debug_v(T x) {
  cerr << __LINE__ << " " << var_name(x) << " [";
  bool first = true;
  for (const auto &itr : x) {
    if (!first) {
      cerr << ", ";
    }
    cerr << itr;
    first = false;
  }
  cerr << "]" << endl;
}

struct Initializer {
  Initializer() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(15) << boolalpha;
  }
} initializer;

template <typename T, typename S> bool chmin(T &a, const S &b) {
  return a > b ? a = b, true : false;
}

template <typename T, typename S> bool chmax(T &a, const S &b) {
  return a < b ? a = b, true : false;
}

template <typename T> constexpr T inf() {
  return numeric_limits<T>::max() / 2 - 1;
}

/************/
/* main.cpp */
/************/

int main() {
  auto tax = [](int x, int p) { return x * (100 + p) / 100; };
  int x, y, s;
  while (true) {
    cin >> x >> y >> s;
    if (x == 0 && y == 0 && s == 0) {
      break;
    }
    int res = -1;
    for (int i = 1; i < s; ++i) {
      for (int j = i; j < s; ++j) {
        if (tax(i, x) + tax(j, x) == s) {
          chmax(res, tax(i, y) + tax(j, y));
        }
      }
    }
    cout << res << endl;
  }
}
accuracy: 1
time_ms: 30
memory_kb: 3456
final_rank: 12

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using a2 = array<ll, 2>;
using a3 = array<ll, 3>;

template <typename A> void chmin(A &l, const A &r) {
    if(r < l)
        l = r;
}
template <typename A> void chmax(A &l, const A &r) {
    if(l < r)
        l = r;
}

ll mod = 998244353;

ll n,m,a;
void input() {
    cin>>n>>m>>a;
}

void solve() {
    ll ans = 0;
    for(int i=1;i<=a;i++)
    {
        for(int j=i;j<=a;j++)
        {
            if((i*(100+n))/100+(j*(100+n))/100==a)
            {
                chmax(ans,(i*(100+m))/100+(j*(100+m))/100);
            }
        }
    }
    cout << ans << endl;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(0);

    while(1) {
        input();
        if(n == 0)
            break;
        solve();
    }

    return 0;
}
accuracy: 1
time_ms: 30
memory_kb: 3340
final_rank: 7

code_snippet: #include <iostream>
#include <algorithm>
using namespace std;

using ll = long long;

ll tax(ll price, ll tax_rate) {
    return (price * (100 + tax_rate)) / 100;
}

int main() {
    ll x, y, s;

    while (cin >> x >> y >> s) {
        if (x == 0 && y == 0 && s == 0) break;

        ll max_sum = 0;

        for (ll a = 1; a < s; ++a) {
            for (ll b = a; b < s; ++b) {
                ll sum_before = tax(a, x) + tax(b, x);
                if (sum_before == s) {
                    ll sum_after = tax(a, y) + tax(b, y);
                    max_sum = max(max_sum, sum_after);
                }
            }
        }

        cout << max_sum << endl;
    }

    return 0;
}
accuracy: 1
time_ms: 40
memory_kb: 3372
final_rank: 10

code_snippet: // AOJ 1192 - Tax Rate Changed
// ICPC Japan Domestic Contest 2014 - Problem A

#include <bits/stdc++.h>
using namespace std;

int main() {
  while(true) {
    int X, Y, S; cin >> X >> Y >> S;
    if(X == 0) break;

    int ans = 0;
    for(int a = 1; a < S; ++a) {
      for(int b = 1; b <= S - a; ++b) {
        if(a * (100 + X) / 100 + b * (100 + X) / 100 == S) {
          ans = max(ans, a * (100 + Y) / 100 + b * (100 + Y) / 100);
        }
      }
    }
    cout << ans << endl;
  }
}
accuracy: 1
time_ms: 30
memory_kb: 3320
final_rank: 6

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ull = unsigned long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using P = pair<int, int>;
using PP = pair<int, P>;
using PLL = pair<ll, ll>;
using PPLL = pair<ll, PLL>;
#define rep(i, n) for(ll i = 0; i < n; ++i)
#define rrep(i, n) for(ll i = n - 1; i >= 0; --i)
#define loop(i, a, b) for(ll i = a; i <= b; ++i)
#define all(v) v.begin(), v.end()
#define nC2(n) n * (n - 1) / 2
constexpr ll INF = 9009009009009009009LL;
constexpr int INF32 = 2002002002;
constexpr ll MOD = 998244353;
constexpr ll MOD107 = 1000000007;

// Linear Algebra ////////////////////////////////////////////////
const double Rad2Deg = 180.0 / M_PI;
const double Deg2Rad = M_PI / 180.0;
//////////////////////////////////////////////////////////////////

int dx[8] = {0, 1, 0, -1, 1, 1, -1, -1};
int dy[8] = {1, 0, -1, 0, 1, -1, 1, -1};

template <class T>
inline bool chmax(T &a, const T &b) {
	if (a < b) {
		a = b;
		return true;
	}
	return false;
}
template <class T>
inline bool chmin(T &a, const T &b) {
	if (a > b) {
		a = b;
		return true;
	}
	return false;
}

template <typename Container,
          typename = std::enable_if_t<
              !std::is_same_v<Container, std::string> &&
              std::is_convertible_v<decltype(std::declval<Container>().begin()),
                                    typename Container::iterator>>>
ostream &operator<<(ostream &os, const Container &container) {
    auto it = container.begin();
    auto end = container.end();

    if (it != end) {
        os << *it;
        ++it;
    }
	for (; it != end; ++it) {
		os << " " << *it;
	}
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<T>& v) {
    for (size_t i = 0; i < v.size(); ++i) {
        os << v[i];
        if (i != v.size() - 1) os << " ";
    }
    return os;
}
template <typename T>
ostream& operator<<(ostream& os, const vector<vector<T>>& vv) {
	for (size_t i = 0; i < vv.size(); ++i) {
		os << vv[i];
		if (i != vv.size() - 1) os << "\n";
    }
    return os;
}
template <typename T>
istream& operator>>(istream& is, vector<T>& v) {
	assert(v.size() > 0);
	for (size_t i = 0; i < v.size(); ++i) is >> v[i];
	return is;
}
template <typename T>
istream& operator>>(istream& is, vector<vector<T>>& vv) {
	assert(vv.size() > 0);
	for (size_t i = 0; i < vv.size(); ++i) is >> vv[i];
	return is;
}

struct phash {
	template<class T1, class T2>
    inline size_t operator()(const pair<T1, T2> & p) const {
        auto h1 = hash<T1>()(p.first);
        auto h2 = hash<T2>()(p.second);

		size_t seed = h1 + h2; 
		h1 = ((h1 >> 16) ^ h1) * 0x45d9f3b;
        h1 = ((h1 >> 16) ^ h1) * 0x45d9f3b;
        h1 = (h1 >> 16) ^ h1;
        seed ^= h1 + 0x9e3779b9 + (seed << 6) + (seed >> 2);
		h2 = ((h2 >> 16) ^ h2) * 0x45d9f3b;
        h2 = ((h2 >> 16) ^ h2) * 0x45d9f3b;
        h2 = (h2 >> 16) ^ h2;
        seed ^= h2 + 0x9e3779b9 + (seed << 6) + (seed >> 2);
        return seed;
    }
};





int solve() {
	ll x, y, s;
	cin >> x >> y >> s;
	if (x == 0) return 1;

	ll ans = -INF;
	loop(i, 1, 999) {
		loop(j, 1, 999) {
			ll before = i * (100 + x) / 100 + j * (100 + x) / 100;
			if (before == s) {
				ll after = i * (100 + y) / 100 + j * (100 + y) / 100;
				chmax(ans, after);
			}
		}
	}

	cout << ans << endl;

	return 0;
}

int main() {
	cin.tie(nullptr);
	ios::sync_with_stdio(false);

	while (!solve()) { }

	return 0;
}
accuracy: 1
time_ms: 180
memory_kb: 3584
final_rank: 20

code_snippet: #include <iostream>
#include <vector>
#include <algorithm>
//#include <bits/stdc++.h>
using namespace std;

int newtax(int a,int p){
   return p * (100 + a) / 100;
}

int main(){
    int x,y,s;
    while(true){
        cin >> x >> y >> s;
        if (x == 0 && y == 0 && s == 0){
            break;
        }
        int M = 0;
        /*
        for (int i = 1; i<s; i++){
            int sum = newtax(x,y,i) + newtax(x,y,s-i);
            M = max(M,sum);
        }
        */
        for (int i=1; i<s; i++){
            for (int j=1; j<s; j++){
                if (newtax(x,i) + newtax(x,j) == s){
                    int sum = newtax(y,i) + newtax(y,j);
                    M = max(M,sum);
                }
            }
        }
        cout << M << endl;
    }
}
accuracy: 1
time_ms: 60
memory_kb: 3584
final_rank: 17

code_snippet: #include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
#include<cstring>
#include<numeric>

#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define dump(a) (cerr << #a << "=" << (a) << endl)
#define DUMP(list) cout << "{ "; for(auto nth : list){ cout << nth << " "; } cout << "}" << endl;

using namespace std;

int calc(int p, int x){
	return p*(100+x)/100;
}

int main()
{
	int X,Y,S;

	while(cin >> X >> Y >> S && X)
	{
		int ans=0;
		REP( y, 1, S ){
			REP( x, 1, S ){	
				if(calc(x,X)+calc(y,X) == S){
					int x2 = calc(x,Y);
					int y2 = calc(y,Y);
					ans = max(x2+y2,ans);
				}
			}
		}
			
		cout << ans << endl;

	}
	return 0;
}
accuracy: 1
time_ms: 60
memory_kb: 3456
final_rank: 15

code_snippet: #include <iostream> 
using namespace std;
int main() { 
    int x,y,s;
    while (cin >> x && x>0){
        cin >>y;
        cin >>s;
        int a,b,max;
        max=0;
        for (int i=1;i<s;i++){
            for(int j=1;j<=i;j++){
                a=i*(100+x)/100;
                b=j*(100+x)/100;
                if(a+b==s){
                    a=i*(100+y)/100;
                    b=j*(100+y)/100;
                    if((a+b)>max){
                        max = a+b;
                    }
                }
            }
        }
        cout<<max<<endl;
    }
}
accuracy: 1
time_ms: 30
memory_kb: 3364
final_rank: 8

code_snippet: #include<bits/stdc++.h>
using namespace std;
using ll = long long;

int main() {
 int x,y,s;
 while(cin >> x >> y >> s){
   if(x == 0&&y == 0&&s == 0) break;
    int ans = 0;
    for(int i = 1; i < s; i++){
        for(int j = 1 ; j < s;j++){
            int I = i*(100+x)/100;
            int J = j*(100+x)/100;
            if(I+J == s){
                ans = max(ans,i*(100+y)/100+j*(100+y)/100);
            }
        }
    }
    cout << ans << endl;
 }
}
accuracy: 1
time_ms: 60
memory_kb: 3356
final_rank: 13

code_snippet: #include <bits/stdc++.h>
#include <atcoder/all>
using namespace atcoder;
using namespace std;
#define all(...) std::begin(__VA_ARGS__), std::end(__VA_ARGS__)
#define rall(...) std::rbegin(__VA_ARGS__), std::rend(__VA_ARGS__)
#define OVERLOAD_REP(_1, _2, _3, _4, name, ...) name
#define REP1(n) for(ll i=0;i<n;i++)
#define REP2(i, n) for (ll i=0;i<n;i++)
#define REP3(i, a, n) for (ll i=a;i<n;i++)
#define REP4(i, a, b, n) for(ll i=a;i<n;i+=b)
#define rep(...) OVERLOAD_REP(__VA_ARGS__, REP4, REP3, REP2, REP1)(__VA_ARGS__)
#define OVERLOAD_RREP(_1, _2, _3, _4, name, ...) name
#define RREP1(n) for(ll i=n;i>=0;i--)
#define RREP2(i, n) for(ll i=n;i>=0;i--)
#define RREP3(i, a, n) for(ll i=n;i>=a;i--)
#define RREP4(i, a, b, n) for(ll i=n;i>=a;i-=b)
#define rrep(...) OVERLOAD_RREP(__VA_ARGS__, RREP4, RREP3, RREP2, RREP1)(__VA_ARGS__)
#define foa(a,v)  (auto& a : (v))
#define uniq(a) sort(all(a));a.erase(unique(all(a)),end(a))
#define len(n) (long long)(n).size()
#define pb push_back
using ll = long long;
using ld = long double;
using ull = unsigned long long;
using vi = vector<int>;
using vvi = vector<vi>;
using vvvi = vector<vvi>;
using vll = vector<ll>;
using vvll = vector<vll>;
using vvvll = vector<vvll>;
using vs = vector<string>;
using vvs = vector<vs>;
using vvvs = vector<vvs>;
using vld = vector<ld>;
using vvld = vector<vld>;
using vvvld = vector<vvld>;
using vc = vector<char>;
using vvc = vector<vc>;
using vvvc = vector<vvc>;
using pll = pair<ll,ll>;
using vpll = vector<pll>;
template<class... T>
constexpr auto min(T... a){
    return min(initializer_list<common_type_t<T...>>{a...});
}
template<class... T>
constexpr auto max(T... a){
    return max(initializer_list<common_type_t<T...>>{a...});
}
template<class... T>
void input(T&... a){
    (cin >> ... >> a);
}
ll modpow(ll a,ll b,ll c){
    ll ans = 1;
    while (b){
        if (b & 1){
            ans *= a;
            ans %= c;
        }
        a *= a;
        a %= c;
        b /= 2;
    }
    return ans;
}
#define INT(...) int __VA_ARGS__; input(__VA_ARGS__)
#define LL(...) ll __VA_ARGS__; input(__VA_ARGS__)
#define ULL(...) ull __VA_ARGS__; input(__VA_ARGS__)
#define LD(...) ld __VA_ARGS__; input(__VA_ARGS__)
#define STR(...) string __VA_ARGS__; input(__VA_ARGS__)
#define CHA(...) char __VA_ARGS__; input(__VA_ARGS__)
#define VLL(name,length) vll name(length);rep(i,length){cin >> name[i];}
#define VVLL(name,h,w) vvll name(h,vll(w));rep(i,h)rep(j,w){cin >> name[i][j];}
#define VVVLL(name,a,b,c) vvvll name(a,vvll(b,vll(c)));rep(i,a)rep(j,b)rep(k,c){cin >> name[i][j][k];}
#define VI(name,length) vi name(length);rep(i,length){cin >> name[i];}
#define VVI(name,h,w) vvi name(h,vi(w));rep(i,h)rep(j,w){cin >> name[i][j];}
#define VVVI(name,a,b,c) vvvi name(a,vvll(b,vi(c)));rep(i,a)rep(j,b)rep(k,c){cin >> name[i][j][k];}
#define VLD(name,length) vld name(length);rep(i,length){cin >> name[i];}
#define VVLD(name,h,w) vvld name(h,vld(w));rep(i,h)rep(j,w){cin >> name[i][j];}
#define VVVLD(name,a,b,c) vvvld name(a,vvld(b,vld(c)));rep(i,a)rep(j,b)rep(k,c){cin >> name[i][j][k];}
#define VC(name,length) vc name(length);rep(i,length){cin >> name[i];}
#define VVC(name,h,w) vvc name(h,vc(w));rep(i,h)rep(j,w){cin >> name[i][j];}
#define VVVC(name,a,b,c) vvvc name(a,vvc(b,vc(c)));rep(i,a)rep(j,b)rep(k,c){cin >> name[i][j][k];}
#define VS(name,length) vs name(length);rep(i,length){cin >> name[i];}
#define VVS(name,h,w) vvs name(h,vs(w));rep(i,h)rep(j,w){cin >> name[i][j];}
#define VVVS(name,a,b,c) vvvs name(a,vvs(b,vs(c)));rep(i,a)rep(j,b)rep(k,c){cin >> name[i][j][k];}
#define PLL(name) pll name;cin>>name.first>>name.second;
#define VPLL(name,length) vpll name(length);rep(i,length){cin>>name[i].first>>name[i].second;}

void print(){cout << "\n";}
template<class T, class... Ts>
void print(const T& a, const Ts&... b){cout << a;(cout << ... << (cout << ' ', b));cout << '\n';}
void print(vll x){rep(i,len(x)){cout << x[i];if(i!=len(x)-1){cout << " ";}else{cout << '\n';}}}
void print(vvll x){rep(i,len(x))rep(j,len(x[i])){cout << x[i][j];if(j!=len(x[i])-1){cout << " ";}else{cout << '\n';}}}

void solve(ll x,ll y,ll s){
    ll ans = 0;
    rep(i,1,s){
        rep(j,1,s){
            ll z = i * (100 + x) / 100 + j * (100 + x) / 100;
            if(z == s){
                ans = max(ans,i * (100 + y) / 100 + j * (100 + y) / 100);
            }
        }
    }
    print(ans);
}

int main(){
    while(1){
        LL(x,y,s);
        if(x == 0 && y == 0 && s == 0){break;}
        solve(x,y,s);
    }
}
accuracy: 1
time_ms: 60
memory_kb: 3584
final_rank: 17

code_snippet: #include <iostream>
#include <cmath>
using namespace std;
int X, Y, S;

int tax(int rate, int price)
{
    return ((100 + rate) * price) / 100;
}

int solve()
{
    int maximum = 0;
    for (int i = 1; i < S; ++i)
        for (int j = i; j < S; ++j)
            if (tax(X, i) + tax(X, j) == S)
                maximum = max(maximum, tax(Y, i) + tax(Y, j));

    return maximum;
}

int main()
{
    while (cin >> X >> Y >> S && X > 0)
    {
        cout << solve() << endl;
    }
}
accuracy: 1
time_ms: 30
memory_kb: 3076
final_rank: 4

code_snippet: #include <iostream>
using namespace std;

int x, y, s;
int p1, p2, tax_old, tax_new;

int main()
{
    cin >> x >> y >> s;
    while (x || y || s)
    {
        for (p1 = 1; p1 < s; p1++)
        {
            for (p2 = 1; p2 <= s - p1; p2++)
            {
                tax_old = (p1 * (100 + x)) / 100 + (p2 * (100 + x)) / 100;
                if (tax_old == s)
                {
                    tax_new = max(tax_new, (p1 * (100 + y)) / 100 + (p2 * (100 + y)) / 100);
                }
            }
        }

        cout << tax_new << endl;
        tax_new = 0;
        cin >> x >> y >> s;
    }

    return 0;
}
accuracy: 1
time_ms: 30
memory_kb: 3080
final_rank: 5

code_snippet: #include <iostream>
#include <algorithm>
using namespace std;

int calculate_tax(int price, int tax_rate) {
    return (price * (100 + tax_rate)) / 100;
}

int main() {
    int x, y, s;

    while (true) {
        cin >> x >> y >> s;
        if (x == 0 && y == 0 && s == 0) break;

        int maximum = 0;

        for (int i = 1; i <= s - 1; ++i) {
            for (int k = i; k <= s - 1; ++k) {
                if (i + k > s) break;

                int old_total1 = calculate_tax(i, x);
                int old_total2 = calculate_tax(k, x);

                if (old_total1 + old_total2 == s) {
                    int new_total = calculate_tax(i, y) + calculate_tax(k, y);
                    maximum = max(maximum, new_total);
                }
            }
        }

        cout << maximum << endl;
    }

    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3084
final_rank: 3

code_snippet: #include <iostream>
#include <cmath>
#include <algorithm>

using namespace std;

int calculate_tax_inclusive_price(int price, int tax_rate) {
    return (price * (100 + tax_rate)) / 100;
}

int main() {
    int x, y, s;

    while (true) {
        cin >> x >> y >> s;
        if (x == 0 && y == 0 && s == 0) break;

        int maximum = 0;

        for (int i = 1; i <= s - 1; ++i) {
            for (int k = i; k <= s - 1; ++k) {
                if (i + k > s) break;

                int old_total1 = calculate_tax_inclusive_price(i, x);
                int old_total2 = calculate_tax_inclusive_price(k, x);
                
                if (old_total1 + old_total2 == s) {
                    int new_total = calculate_tax_inclusive_price(i, y) + calculate_tax_inclusive_price(k, y);
                    maximum = max(maximum, new_total);
                }
            }
        }

        cout << maximum << endl;
    }

    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3072
final_rank: 2

code_snippet: #include <bits/stdc++.h>
#define rep(i, n) for (int i = 0; i < (int)(n); i++)
#define all(x) (x).begin(),(x).end()
#define eb emplace_back
using namespace std;
using ll = long long;
using ld = long double;
using vl = vector<long long>;
using vvl = vector<vector<long long>>; using vs = vector<string>;
using pl = pair<long long, long long>;
template <typename T> inline bool chmin(T& a, const T& b) {bool compare = a > b; if (a > b) a = b; return compare;}
template <typename T> inline bool chmax(T& a, const T& b) {bool compare = a < b; if (a < b) a = b; return compare;}
template<class T>using rp_queue=priority_queue<T,vector<T>,greater<T>>;
template <typename T> T gcd(T a, T b) {if (b == 0)return a; else return gcd(b, a % b);}
template <typename T> inline T lcm(T a, T b) {return a /gcd(a, b)*b;}
const ll INF = 1LL << 60;
const ld PI = acos(-1);
template <class OStream, class T> OStream &operator<<(OStream &os, const std::vector<T> &vec);
template <class OStream, class T, size_t sz> OStream &operator<<(OStream &os, const std::array<T, sz> &arr);
template <class OStream, class T, class TH> OStream &operator<<(OStream &os, const std::unordered_set<T, TH> &vec);
template <class OStream, class T, class U> OStream &operator<<(OStream &os, const pair<T, U> &pa);
template <class OStream, class T> OStream &operator<<(OStream &os, const std::deque<T> &vec);
template <class OStream, class T> OStream &operator<<(OStream &os, const std::set<T> &vec);
template <class OStream, class T> OStream &operator<<(OStream &os, const std::multiset<T> &vec);
template <class OStream, class T> OStream &operator<<(OStream &os, const std::unordered_multiset<T> &vec);
template <class OStream, class T, class U> OStream &operator<<(OStream &os, const std::pair<T, U> &pa);
template <class OStream, class TK, class TV> OStream &operator<<(OStream &os, const std::map<TK, TV> &mp);
template <class OStream, class TK, class TV, class TH> OStream &operator<<(OStream &os, const std::unordered_map<TK, TV, TH> &mp);
template <class OStream, class... T> OStream &operator<<(OStream &os, const std::tuple<T...> &tpl);
 
template <class OStream, class T> OStream &operator<<(OStream &os, const std::vector<T> &vec) { os << '['; for (auto v : vec) os << v << ','; os << ']'; return os; }
template <class OStream, class T, size_t sz> OStream &operator<<(OStream &os, const std::array<T, sz> &arr) { os << '['; for (auto v : arr) os << v << ','; os << ']'; return os; }
template <class... T> std::istream &operator>>(std::istream &is, std::tuple<T...> &tpl) { std::apply([&is](auto &&... args) { ((is >> args), ...);}, tpl); return is; }
template <class OStream, class... T> OStream &operator<<(OStream &os, const std::tuple<T...> &tpl) { os << '('; std::apply([&os](auto &&... args) { ((os << args << ','), ...);}, tpl); return os << ')'; }
template <class OStream, class T, class TH> OStream &operator<<(OStream &os, const std::unordered_set<T, TH> &vec) { os << '{'; for (auto v : vec) os << v << ','; os << '}'; return os; }
template <class OStream, class T> OStream &operator<<(OStream &os, const std::deque<T> &vec) { os << "deq["; for (auto v : vec) os << v << ','; os << ']'; return os; }
template <class OStream, class T> OStream &operator<<(OStream &os, const std::set<T> &vec) { os << '{'; for (auto v : vec) os << v << ','; os << '}'; return os; }
template <class OStream, class T> OStream &operator<<(OStream &os, const std::multiset<T> &vec) { os << '{'; for (auto v : vec) os << v << ','; os << '}'; return os; }
template <class OStream, class T> OStream &operator<<(OStream &os, const std::unordered_multiset<T> &vec) { os << '{'; for (auto v : vec) os << v << ','; os << '}'; return os; }
template <class OStream, class T, class U> OStream &operator<<(OStream &os, const std::pair<T, U> &pa) { return os << '(' << pa.first << ',' << pa.second << ')'; }
template <class OStream, class TK, class TV> OStream &operator<<(OStream &os, const std::map<TK, TV> &mp) { os << '{'; for (auto v : mp) os << v.first << "=>" << v.second << ','; os << '}'; return os; }
template <class OStream, class TK, class TV, class TH> OStream &operator<<(OStream &os, const std::unordered_map<TK, TV, TH> &mp) { os << '{'; for (auto v : mp) os << v.first << "=>" << v.second << ','; os << '}'; return os; }
#ifdef LOCAL
const string COLOR_RESET = "\033[0m", BRIGHT_GREEN = "\033[1;32m", BRIGHT_RED = "\033[1;31m", BRIGHT_CYAN = "\033[1;36m", NORMAL_CROSSED = "\033[0;9;37m", RED_BACKGROUND = "\033[1;41m", NORMAL_FAINT = "\033[0;2m";
#define dbg(x) std::cerr << BRIGHT_CYAN << #x << COLOR_RESET << " = " << (x) << NORMAL_FAINT << " (L" << __LINE__ << ") " << __FILE__ << COLOR_RESET << std::endl
#define dbgif(cond, x) ((cond) ? std::cerr << BRIGHT_CYAN << #x << COLOR_RESET << " = " << (x) << NORMAL_FAINT << " (L" << __LINE__ << ") " << __FILE__ << COLOR_RESET << std::endl : std::cerr)
#else
#define dbg(x) ((void)0)
#define dbgif(cond, x) ((void)0)
#endif
void solve();
int main(){
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  cout<<fixed<<setprecision(15);
  int num_tc = 1;
  //cin >> num_tc;
  rep(tc,num_tc){
    //cout << "Case #" << tc+1 << ": " ;// << endl;
    solve();
  }
}
//見切り発車で実装しては行けない．頭の中でコードが完全に出来上がるまで書き始めるな．
//オーバーフローしているか確認する
//小さいケースで動いているかを確認する。
void solve(){
  while(true){
    ll x,y,s;cin>>x>>y>>s;
    if(x==0&&y==0&&s==0)return;
    ll ans = 0;
    for(int i=1;i<s;i++){
      //元がi + j円
      for(int j=s-i;j>=1;j--){
        ll ni = i *(100+x)/100;
        ll nj = j *(100+x)/100;
        if(ni+nj==s){
          ll now = i*(100+y)/100;
          now+=j*(100+y)/100;
          chmax(ans,now);
        }
      }
    }
    cout<<ans<<endl;
  }
}
accuracy: 1
time_ms: 30
memory_kb: 3388
final_rank: 9

code_snippet: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int INF = (int)1e9 + 1001010;
const ll llINF = (long long)4e18 + 22000020;
const string endn = "\n";
template <class T> inline auto vector2(size_t i, size_t j, const T &init = T()) {return vector(i, vector<T>(j, init));}
const string ELEM_SEPARATION = " ", VEC_SEPARATION = endn;
template<class T> istream& operator >>(istream &i, vector<T> &A) {for(auto &I : A) {i >> I;} return i;}
template<class T> ostream& operator <<(ostream &o, const vector<T> &A) {int i=A.size(); for(const auto &I : A){o << I << (--i ? ELEM_SEPARATION : "");} return o;}
template<class T> ostream& operator <<(ostream &o, const vector<vector<T>> &A) {int i=A.size(); for(const auto &I : A){o << I << (--i ? VEC_SEPARATION : "");} return o;}
template<class T> vector<T>& operator ++(vector<T> &A, int n) {for(auto &I : A) {I++;} return A;}
template<class T> vector<T>& operator --(vector<T> &A, int n) {for(auto &I : A) {I--;} return A;}
template<class T, class U> bool chmax(T &a, const U &b) {return ((a < b) ? (a = b, true) : false);}
template<class T, class U> bool chmin(T &a, const U &b) {return ((a > b) ? (a = b, true) : false);}
ll floor(ll a, ll b){if (b < 0) a = -a, b = -b; if(a >= 0) return a / b; else return (a + 1) / b - 1;}
ll ceil(ll a, ll b){if (b < 0) a = -a, b = -b; if(a > 0) return (a - 1) / b + 1; else return a / b;}
ll bit(unsigned long long val, unsigned long long digit){return (val >> digit) & 1;}
#ifdef DEBUG
#include <debug_slephy.cpp>
#else
#define debug(...)
#endif
// ================================== ここまでテンプレ ==================================


void solve(){
    ll x, y, s; cin >> x >> y >> s;
    if(x == 0) exit(0);

    // p円, x%
    auto add_tax = [&](ll p, ll x) -> ll {
        return floor(p * (100 + x), 100);
    };

    map<ll, ll> max_value;
    for(int p = 1; p < 1010; p++){
        ll t1 = add_tax(p, x);
        ll t2 = add_tax(p, y);
        chmax(max_value[t1], t2);
    }

    ll ans = 0;
    for(ll s1 = 1; s1 <= s-1; s1++){
        ll s2 = s - s1;
        ll this_ans = max_value[s1] + max_value[s2];
        chmax(ans, this_ans);
    }
    cout << ans << endl;
}

int main(int argc, char *argv[]){
    ios::sync_with_stdio(false);
    cin.tie(nullptr);


    while(true) solve();
    return 0;
}
accuracy: 1
time_ms: 20
memory_kb: 3488
final_rank: 11