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>
#include <algorithm>
#include <cmath>


using namespace std;

int main(){
    int n,m,p;
    while(cin >> n >> m >> p){
        if((n|m|p) == 0) break;
        int v[n],sum=0,ret;
        for(int i=0;i<n;i++){
            cin >> v[i];
            sum += v[i];
        }
        //1-T¦ð|¯Äzª³êéàzÉ·é
        sum *= 100 - p;
        //zª³êéàz/I=1 ½è
        ret = v[m-1]?sum / v[m-1]:0;
        cout << ret << endl;
            
    }
}

C++: #include<cstdio>

using namespace std;

int main(){
	for(int n,m,p;scanf("%d%d%d",&n,&m,&p),n;){
		int x[100],sum=0;
		for(int i=0;i<n;i++)	scanf("%d",x+i),sum+=x[i];
		if(x[m-1]==0)	puts("0");
		else{
			int ans=100*sum*(100-p)/(100*x[m-1]);
			printf("%d\n",ans);
		}
	}
	return 0;
}

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

int main(){
  int n, m, p, x[101], ans;

  while(cin >> n >> m >> p && n){
    for(int i=1; i<=n; i++){
      int sum=0;
      cin >> x[i];
      sum+=x[i];
    }
    if(x[m]!=0){
      ans = sum * (100-p) / x[m];
      cout << ans << endl;
    } else {
      cout << 0 << 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;
	double X[120];
	long long sum,ans;
	double zyun_money_per;


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

	return 0;
}

C++: #include <iostream>
#define EPS 1e-9
using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,i,d,sum;
	while(1){
		sum=0;
	cin>>a>>b>>c;
	if(a==0&&a==b&&c==0)break;
for(i=0;i<a;i++){
cin>>d;
sum+=d;
if(i==b-1)b=d;
}
if(b==0)cout<<b<<endl;
if(c==100)cout<<0<<endlel;
else if(c==0)cout<<sum*100/b<<endl;
else cout<<(sum*100-sum*c)/b<<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;
    int maisu = 0, win = -1;
    

    for(int i = 1; i <= N; i++){
      cin >> maisu;
      sum += maisu;
      if(i == M) win = maisu;
    }
    if(win == 0) cout << 0 << endl;
    else    cout << ((sum * 100 * (100 - P)) / 100) / win << endl;
    win = -1;
    maisu = 0;
    sum = 0;
  }

  return 0;
}

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

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

#define vi vector<int>
#define pb push_back
#define mp make_pair

typedef long long ll;

int main() {

    int n, m, p;
    int x[110];
    while (cin >> n >> m >> p, n != 0) {
        memset(x,0,sizeof(x));
        rep(i, n)cin >> x[i + 1];

        int sum = 0;
        rep(i, n)sum += x[i + 1];
        double ans = 0;
        if (x[m]!=0) ans = sum * 100 * ((100 - p) / 100.0 )/ x[m];

        printf("%.0lf\n", ans);
    }

    return 0;
}

C++: #include<iostream>
#include<string.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> pii;

int main()
{
  int n,m,p,x;
  int num[105]={};
  int i;

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

}

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];
	long long 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;


	}
}