Go: package main

import (
	"fmt"
	"math"
)

func main() {
	var M, N, P int
	for {
		fmt.Scan(&N, &M, &P)
		if N == 0 && M == 0 && P == 0 {
			return
		}

		arr := make([]int, N)
		sum := 0
		for i := 0; i < N; i++ {
			var po int
			fmt.Scan(&po)
			arr[i] = po
			sum += po
		}

		if arr[M-1] == 0 {
			fmt.Println(0)
		} else {
			fmt.Println(math.Floor(float64(sum * (100 - P) / arr[M-1])))
		}
	}
}

C++: #include <bits/stdc++.h>
#define endl '\n'
#define int long long
#define lint long long
#define pii pair<int, int>
#define FOR(i, a, b) for(int i = (a); i < (b); ++i)
#define FORR(i, a, b) for(int i = (a); i > (b); --i)
#define REP(i, n) FOR(i, 0, n)
#define SZ(v) ((int)v.size())
#define ZERO(a) memset(a, 0, sizeof(a))
#define MINUS(a) memset(a, 0xff, sizeof(a))
#define FILLINF(a) memset(a, 0x3f, sizeof(a))
#define POW(n) (1LL << (n))
#define POPCNT(n) (__builtin_popcount(n))
#define IN(i, a, b) ((a) <= (i) && (i) <= (b))
using namespace std;
template <typename T> inline bool CHMIN(T& a, T b) { if(a > b) { a = b; return 1; } return 0; }
template <typename T> inline bool CHMAX(T& a, T b) { if(a < b) { a = b; return 1; } return 0; }
template <typename T> inline void SORT(T& a) { sort(begin(a), end(a)); }
template <typename T> inline void REV(T& a) { reverse(begin(a), end(a)); }
template <typename T> inline void UNI(T& a) { sort(a.begin(), a.end()); a.erase(unique(a.begin(), a.end()), a.end()); }
template <typename S, typename T> inline T LB(S& v, T a) { return *lower_bound(begin(v), end(v), a); }
template <typename S, typename T> inline int LBP(S& v, T a) { return lower_bound(begin(v), end(v), a) - begin(v); }
template <typename S, typename T> inline T UB(S& v, T a) { return *upper_bound(begin(v), end(v), a); }
template <typename S, typename T> inline int UBP(S& v, T a) { return upper_bound(begin(v), end(v), a) - begin(v); }
template <typename S, typename T> ostream& operator << (ostream& os, const pair<S, T>& p) { os << p.first << " " << p.second; return os; }
template <typename S, typename T> istream& operator >> (istream& is, pair<S, T>& p) { is >> p.first >> p.second; return is; }
template <typename T> ostream& operator << (ostream& os, const vector<T>& v) { for (int i = 0; i < v.size(); ++i) { if (i) os << " "; os << v[i]; } return os; }
template <typename T> istream& operator >> (istream& is, vector<T>& v) { for(T& in : v) is >> in; return is; }
template <typename T = int> vector<T> make_v(size_t a) { return vector<T>(a); }
template <typename T, typename... Ts> auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a,make_v<T>(ts...)); }
template <typename T, typename V> typename enable_if<is_class<T>::value == 0>::type fill_v(T& t, const V& v) { t = v; }
template <typename T, typename V> typename enable_if<is_class<T>::value != 0>::type fill_v(T& t, const V& v) { for(auto &e : t) fill_v(e, v); }
const double PI = 3.14159265358979323846;
const double EPS = 1e-10;
const lint INF = 0x3f3f3f3f3f3f3f3f;
const lint MOD = 1000000007;

void _main() {
    int N, M, P;
    while (cin >> N >> M >> P, N) {
        vector<int> X(N);
        int sum = 0;
        REP (i, N) {
            cin >> X[i];
            sum += X[i] * 100;
        }
        sum = sum / 100 * (100 - P);
        if (X[M - 1] == 0) cout << 0 << endl;
        else cout << sum / X[M - 1] << endl;
    }
}

signed main(signed argc, char **argv) {
    if (argc > 1) {
        if (strchr(argv[1], 'i')) freopen("input.txt", "r", stdin);
        if (strchr(argv[1], 'o')) freopen("output.txt", "w", stdout);
    }
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(10);
    _main();
    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n, m, p;
	int x[101];
	while (cin >> n >> m >> p && n != 0 && m != 0 && p != 0)
	{
		int sum = 0;
		for (int i = 1; i <= n; i++)
		{
			cin >> x[i];
			sum += x[i]*100;
		}
		if (x[m] == 0)
		{
			cout << 0 << endl;
			continue;
		}
		double ans  =sum - ((double)p /100.0) * sum;
		cout << (int)(ans / x[m]) << endl;

	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define bye return 0

int main(){
  int N,M,P;
  while(cin>>N>>M>>P,N&&M&&P){
    int X[1000],sum=0;
    rep(i,N){
     cin>>X[i];
     sum+=100*X[i];
    }
    sum=sum-sum*P/100;
    rep(i,N+1){
      if(M==i){
        if(X[i-1]!=0){
         cout<<sum/X[i-1]<<endl;
         break;
	}else {
          cout<<'0'<<endl;
          break;
	}
      }
    }
  }
  return 0;
}

C++: #include<iostream>
#include<vector>
#include<numeric>
using namespace std;
int main() {
	int n, m;double p;
	while (cin >> n >> m >> p&&n&&m) {
		p /= 100;
		vector<int> x;
		int cnt = 0,y;
		for (int i = 0; i < n; i++) {
			cin >> y;
			x.push_back(y);
		}
		int money = 100*accumulate(x.begin(), x.end(), 0);
		money = (int)money*(1.0 - p);
		if (x[m-1]==0)cout << 0 << endl;
		else cout << (money / x[m-1]) << endl;
	}
	return 0;
}

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

// region template
#define rep(i, a, b) for (int i = (a); i < (b); ++i)
#define trav(a, x) for (auto &a : x)
#define all(x) begin(x), end(x)
#define sz(x) (int)(x).size()
typedef long long ll;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

ll gcd(ll a, ll b) { return __gcd(a, b); }

ll euclid(ll a, ll b, ll &x, ll &y) {
    if (b) {
        ll d = euclid(b, a % b, y, x);
        return y -= a / b * x, d;
    }
    return x = 1, y = 0, a;
}

typedef unsigned long long ull;
typedef long double ld;
ull mod_mul(ull a, ull b, ull M) {
    ll ret = a * b - M * ull(ld(a) * ld(b) / ld(M));
    return ret + M * (ret < 0) - M * (ret >= (ll)M);
}
ull mod_pow(ull b, ull e, ull mod) {
    ull ans = 1;
    for (; e; b = mod_mul(b, b, mod), e /= 2)
        if (e & 1)
            ans = mod_mul(ans, b, mod);
    return ans;
}

const ll mod = 1000000007;
struct Mod {
    ll x;
    Mod(ll xx) : x(xx) {}
    Mod operator+(Mod b) { return Mod((x + b.x) % mod); }
    Mod operator-(Mod b) { return Mod((x - b.x) % mod); }
    Mod operator*(Mod b) { return Mod((x * b.x) % mod); }
    Mod operator/(Mod b) { return *this * invert(b); }
    Mod invert(Mod a) {
        ll x, y, g = euclid(a.x, mod, x, y);
        assert(g == 1);
        return Mod((x + mod) % mod);
    }
    Mod operator^(ll e) {
        if (!e)
            return Mod(1);
        Mod r = *this ^ (e / 2);
        r = r * r;
        return e & 1 ? *this * r : r;
    }
};
// endregion

int main() {
    cin.sync_with_stdio(0);
    cin.tie(0);
    cin.exceptions(cin.failbit);

    cin >> skipws;

    for (;;) {
        int n, m, p;
        cin >> n >> m >> p;

        if (!n && !m && !p)
            break;

        vector<int> vv(n + 1);
        int ttl = 0;
        rep(i, 1, n + 1) cin >> vv[i], ttl += vv[i];
    
        if (vv[m] == 0) {
            cout << 0 << endl;
        } else {
            cout << (ttl * (100 - p) / vv[m]) << endl;
        }
    }
}

C++: #include <algorithm>
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <string>
#include <vector>

#define el endl
#define fd fixed
#define INF INT_MAX/2-1

using namespace std;

int main() {
  int n, m, p, x, sum, num;
  while (cin >> n >> m >> p, n | m | p) {
    sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> x;
      sum += x;
      if (i == m-1) num = x;
    }
    if (num == 0) cout << x << el;
    else cout << sum*(100-p)/num << el;
  }
}

C++: #include<bits/stdc++.h>

using namespace std;

int main(){

  int n,m,p;

  while(cin>>n>>m>>p,n||m||p){

	vector<int> x(n);
	int total=0;
	
	for(int i=0;i<n;++i){
	  cin>>x[i];
	  total+=x[i];
	}
	
	total=total*(100-p);
	
	if(x[m-1]==0)
	  cout<<0<<endl;
	else{
	  double tmp = total/x[m-1];
	  cout<<(int)total<<endl;
	}
  }

}