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

using namespace std;

int main() {
    while (1) {
        int n, m, p;

        cin >> n >> m >> p;
        if (n == 0) break;

        int gold = 0;
        int winner = 0;
        for (int i = 0; i < n; ++i) {
            int a;
            cin >> a;
            if (i + 1 == m) winner = a;
            gold += a;
        }
        cout << (winner == 0 ? 0 : gold * (100 - p) / winner) << endl;
    }
}

C++: #include <iostream>
#include <stdio.h>
#include <vector>

using namespace std;

#define FOR(i,k,n) for(int i=(k);i<(int)(n);i++)
#define REP(i,n) FOR(i,0,n)

const int INF=100000000;
const bool debug=1;

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

C++: #include<bits/stdc++.h>
#define LL long long
#define REP(i,n) for(int i=0;i<(n);++i)
#define REPA(i,n) for(int i=1;i<(n);++i)
#define foreach(i, n) for(auto &i:(n))
#define PII pair<int,int>
#define PLI pair<long long, int>
#define PLL pair<long long, long long>
#define PDD pair<double, double>
#define MOD ((int)1e9 + 7)
#define INF ((int)1e9)
#define INFLL ((LL)1e18)
#define ALL(x) (x).begin(),(x).end()
#define ctoi(x) (x - 'a') 
#define CTOI(x) (x - 'A')
#define BIT(x) (1 << (x))
using namespace std;

LL modinv(LL a){
    LL b = MOD, u = 1, v = 0;
    while(b){
        LL t = a / b;
        a -= t * b;swap(a, b);
        u -= t * v;swap(u, v);
    }
    u%=MOD;
    if(u < 0) u += MOD;
    return u;

}

LL exp(LL a, LL b){
    LL sum = a;
    LL res = 1;
    while(b){
        if(b&1){
            res = (res * sum)%MOD;
        }
        sum = (sum * sum) % MOD;
        b>>=1;
    }
    return res;
}

int main(){
    int N, M, P;
    while(cin>>N>>M>>P&&N){
        vector<int> line(N);
        int sum = 0;
        foreach(i, line){
            cin>>i;
            sum+=i * 100;
        }
        --M;
        if(line[M]){
            cout << sum * (100-P) / 100 / line[M] << endl; 
        }else{
            cout << 0 << endl;
        }
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int N,M,X[1000],kazu=0,P;
  double kane=0;
  while(1){
      cin>>N;
      cin>>M;
      cin>>P;
      if(N==0 && M==0 && P==0){
        break;
      }
      for(int lop=0;lop<N;lop++){
          cin>>X[lop];
          kazu+=X[lop];
      }
      if(X[M-1]==0){
        kane=0;
      }else{
        kane=kazu*100;
        kane*=(1.0-(double)P*0.01);
        kane=(double)(kane/X[M-1]);
      }

      cout<<(int)kane<<endl;
      kane=0;
      kazu=0;
      for(int lop=0;lop<N;lop++){
          X[lop]=0;
      }
  }

  return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>

using namespace std;

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

	int n, m, p;
	int j = 0;
	vector<long long>ans(100);

	while(1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0)
			break;
		long long sum = 0;

		vector<int>x(n,0);
		for (int i = 0;i < n;i++) {
			cin >> x[i];
			sum += x[i];
		}

		if (x[m - 1] != 0) {
			ans[j] = (sum * 100 / x[m - 1])*(100-p)/100;
		}
		else {
			ans[j] = 0;
		}
		j++;

	} 

	for (int i = 0;i < j;i++) {
		cout << ans[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <numeric>
 
using namespace std;
 
int main(){
    while(true){
        // N, M, P ?????\???
        int n, m, p;
        cin >> n >> m >> p;
 
        // 0 0 0 ????????????
        if(n == 0 && m == 0 && p == 0)
            return 0;
 
        //x ?????\???
        vector<int> x(n);
        for(auto &a:x)
            cin >> a;
 
        // ????????????????????????
        if(x[m - 1] == 0){
            cout << 0 << endl;
            continue;
        }
 
        //????テつィ??????????
        int sum = accumulate(x.begin(), x.end(), 0) * 100;
        //?????????????????????
        double total = sum * (100 - p) / 100;
        //????????????
        int money = total / x[m - 1];
 
        cout << money << endl;
    }
 
    return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;

int main(void){
	int N, M, P;
	int sum, ans;
	int X[1001];

	while(scanf("%d %d %d", &N, &M, &P) != EOF){
		if(N != 0 && M != 0 && P != 0)  break;

		sum = 0;
		for(int i = 0; i < N; i++){
			cin >> X[i];
			sum += X[i];
		}

		P = 100 - P;

		if(X[M-1] == 0)	ans = 0;
		else ans = sum * P / X[M-1];

		cout << ans << endl;
	}
  return 0;
}

C++: #include<iostream>
#include<map>
#include<vector>
#include<list>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<numeric>
#include<climits>
#include<ctime>
#include<cstring>
#define REP(i,p,n) for(int i=p;i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))
#define all(c) (c).begin(), (c).end()

using namespace std;

int main() {
	int N,M,P;
	int X[110];
	int sum;

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

	return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n,m,p,sum,k;

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

    if(n==0&&m==0&&p==0){
      break;
    }

      int x[n];
      for(int i=0;i<n;i++){
	cin>>x[i];
      }

      if(x[m-1]==0){
	cout<<0<<endl;
      }else{

      sum=100*(x[0]+x[1]+x[2]);

      k=sum-sum*p/100;
      

    
      cout<<k/x[m-1]<<endl;
      }
    
    }


  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	int n,m,p;
	while(cin>>n>>m>>p,n,m,p){
		int sum=0,num;
		for(int i=1,now;i<=n;i++){
			cin>>now;
			sum+=now;
			if(i==m)num=now;
		}
		if(num==0)cout<<0<<endl;
		else if(p==100)cout<<100<<endl;
		else cout<<(int)((sum*(100-p))/num)<<endl;
	}
}

C++: #include <cstdio>
#include <iostream>
#include <string>
#include <sstream>
#include <stack>
#include <algorithm>
#include <cmath>
#include <queue>
#include <map>
#include <set>
#include <cstdlib>
#include <bitset>
#include <tuple>
#include <assert.h>
#include <deque>
#include <bitset>
#include <iomanip>
#include <limits>
#include <chrono>
#include <random>
#include <array>
#include <unordered_map>
#include <functional>
#include <complex>
#include <numeric>
#include <cctype>

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

const long long MAX = 5100000;
const long long INF = 1LL << 60;
const long long mod = 1000000007LL;
//const long long mod = 998244353LL;

using namespace std;
typedef unsigned long long ull;
typedef long long ll;




int main()
{
	/*
	cin.tie(nullptr);
	ios::sync_with_stdio(false);
	*/
	while (1) {
		ll N, M, P; scanf("%lld %lld %lld", &N, &M, &P);
		if (N == 0 && M == 0 && P == 0) break;
		ll res = 0;
		ll cnt = 0;
		ll sum = 0;
		for (ll i = 1; i <= N; i++) {
			ll x; scanf("%lld", &x);
			sum += 100 * x;
			if (i == M) cnt += x;
		}
		if (cnt == 0) res = 0;
		else res = sum * (100 - P) / (100 * cnt);
		printf("%lld\n", res);
	}
	return 0;
}