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(void) {
  int n, m, p;
  int x[100];
  int pool;

  while(cin >> n >> m >> p, n!=0 && m!=0 && p!=0) {
    pool = 0;
    for(int i = 0 ; i < n ; i++) {
      cin >> x[i];
      pool += x[i] * 100;
    }
    for(int i = 0 ; i < 100 ; i++) {
      if(i+1 == m) {
	if(x[i] == 0) cout << '0' << endl;
	else cout << pool / x[i] * (100-p) / 100 << endl;
      }
    }
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <cstdio>
#include <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=1000000007;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };


int main() {
	int n,m;
	double p;
	int x[105];
	int ans=0;
	while(true){
		cin>>n>>m>>p;
		if(n+m+p==0) return 0;
		ans=0;
		//cout<<ans<<" "<<n<<" "<<m<<" "<<" "<<p<<endl;
		for(int i=0;i<n;i++){
			cin>>x[i];
			ans+=x[i]*100;
		}
		for(int i=0;i<n;i++){
			if(i+1==m){
				if(x[i]!=0){
					ans=(ans*((100.0-p)/100.0))/x[i];
					break;
				}
				else{
					ans=0;
					break;
				}
			}
		}
		cout<<ans<<endl;


	}
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(int argc, char *argv[])
{
  for(;;) {
    int n, m, p;
    cin >> n >> m >> p;
    if(n == 0) break;
    m--;
    int s = 0;
    int mx = 0;
    for(int i = 0; i < n; i++) {
      int x;
      cin >> x;
      s += x;
      if(i == m) {
        mx = x;
      }
    }
    s *= (100-p);
    cout << (mx == 0 ? 0 : (s/mx)) << 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) {
        vector<int> x(n);
        int sum = 0;
        for (auto& i : x) cin >> i, sum+=i;

        if (x[m-1] > 0) cout << sum * (100 - p) / x[m-1] << endl;
        else cout << 0 << endl;
    }

    return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<cmath>
#include<vector>
#include<map>
#include<numeric>
#include<queue>
#include<string>
#include<sstream>

using namespace std;


int main(void) {

  int n, m, p;
  while( cin >> n >> m >> p ){
    if( n == 0 ) break;
    vector<int> x(n);
    for(int i=0; i<n; i++) cin >> x[i];

    int sum = accumulate(x.begin(), x.end(), 0);
    if( x[m-1] == 0 ) cout << 0 << endl;
    else cout << sum * (100-p) / x[m-1] << endl;

  }

  return 0;
}










//

C++: #include <iostream>

using std::cin;
using std::cout;
using std::endl;

int main(void) {
	int N,M,P;
	
	cin >> N;
	cin >> M;
	cin >> P;

	while (N != 0 || M != 0 || P != 0) {
		int vote;
		int vote_w;
		int sum_vote = 0; 
		int r;
		for (int i = 0; i < N; i++) {
			cin >> vote;
			sum_vote += vote;
			if (i+1 == M) {
				vote_w = vote;
			} 
		}
		if (vote_w != 0) {
			r = ((sum_vote*100)/vote_w) * (1-(double)P/100);
		}else {
			r = 0;
		}
		cout << r << endl; 
		
		cin >> N;
		cin >> M;
		cin >> P;
		sum_vote = 0;
	}
	return 0;
}

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

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

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

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

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <complex>
#include <algorithm>
#include <set>
#include <map>
#include <queue>
#include <string>
#include <cstring>
#include <stack>
#include <cmath>
#include <iomanip>
#include <sstream>
#include <cassert>

using namespace std;

typedef long long ll;
typedef ll li;
typedef pair<int,int> PI;
#define EPS (1e-10L)
#define rep(i,n) for(int i=0;i<(int)(n);++i)
#define F first
#define S second
#define mp(a,b) make_pair(a,b)
#define pb(a) push_back(a)
#define SZ(a) (int)((a).size())
#define ALL(a) a.begin(),a.end()
#define FOR(it,a) for(__typeof(a.begin())it=a.begin();it!=a.end();++it)
void pkuassert(bool t){t=1/t;};

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

int main(){
	int n,m,p;
	while(cin >>n >>m >>p,n!=0&&m!=0&&p!=0){
		int x[n];
		int sum=0;
		rep(i,n){
			cin >> x[i];
			sum+=x[i];
		}
		if(x[m-1] == 0){
			cout << 0 << endl;
		}else{
			sum = (sum * 100 - (sum * p));
			cout << (sum/x[m-1]) << endl;
		}
	}
}

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);
		}
		double money = 100*accumulate(x.begin(), x.end(), 0);
		money = money*(1.0 - p);
		if (x[m-1]==0)cout << 0 << endl;
		else cout << (int)(money / x[m-1]) << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <math.h>
#include <numeric>
#include <algorithm>
using namespace std;
int N, M, P;

int main() {
    while(cin >> N >> M >> P, N&&M&&P){
        int sum=0, temp=0;
        for(int i=0; i<N; ++i){
            int a; cin >> a; 
            if(i==M-1) temp = a;
            sum += a;
        }
        if(temp!=0){  
            cout << sum*(100-P)/temp << endl;
        }else{
            cout << 0 << endl;
        }
    }    
    
    return 0;
}

C++: //#include <bits/stdc++.h>
#include <string>
#include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <utility>
#include <climits>

using namespace std;
using ll=long long;

void solve(){
  while(true){
    int num,m,p;
    cin >> num >> m >> p;
    if(!(num|m|p))return;
    int sum=0,mm;
    for(int i=0;i<num;i++){
      int x;
      cin >> x;
      sum+=x;
      if(m-1==i)mm=x;
    }
    if(mm==0)
    {cout << 0 << endl;continue;}
    sum*=100;
    double re=sum*(double)(100-p)/100;
    cout << (int)(re/mm) << endl;
  }
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  solve();
  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) && (N != 0 || M != 0 || P != 0)){

		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 <vector>
using namespace std;
int main(){
  int n,m,p;
  while(cin >> n >> m >> p,n && m && p){
    vector<int> vec(n,0);
    for(int i = 0;i < n;i++){
      cin >> vec[i];
    }
    int sum = 0;
    for(int i = 0;i < n;i++){
      sum += vec[i]*100;
    }
    sum = sum*(100 - p)/100;
    if(vec[m-1] == 0)cout << 0 << endl;
    else cout << sum / vec[m-1] << endl;
  }
  return 0;
}