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 = 0, m = 0, p = 0;
    while(cin >> n >> m >> p){
        if(n == 0){
            break;
        }
        int allG = 0;
        int plaier[100];
        for(int i = 0; i < 100; i++){
            plaier[i] = 0;
        }
        for(int i = 0; i < n; i++){
            cin >> plaier[i];
            allG += plaier[i];
        }
        int forG = allG * (100-p);
        if(plaier[m-1] == 0){
            cout << 0 << endl;
        }
        else{
            cout << forG / plaier[m-1] << endl;
        }
    }
    return 0;
}

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

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

C++: #include <stdio.h>

int main(){

  int m,n,p,i,sum=0,ans=0;
  int x[100]={};
  for(;;){
    
    scanf("%d %d %d",&n,&m,&p);

    if(n==0&&m==0&&p==0){
      break;
    }
    for(i=1;i<=n;i++){
      scanf("%d",&x[i]);
      sum+=x[i];
    }

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

    if(x[m]==0){
      printf("0\n");
    }
    else{
      printf("%d\n",ans);
    }
      ans=0;
      sum=0;
      for(i=1;i<=n;i++){
	x[i]=0;
      }
    }  
    return 0;
  }

C++: #include <iostream>
using namespace std;
int main () {
	int n, m, p;
	while (cin >> n >> m >> p, n || m || p) {
		int gambler = 0;
		int hit;
		for (int i = 0; i < n; i++) {
			int x;
			cin >> x;
			gambler += x;
			if (i + 1 == m) hit = x;
		}
		if (hit) {
			int pool = gambler * 100 - gambler * p;
			cout << pool / hit << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	return 0;
}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<vector>
#include<iomanip>
#include<math.h>
#include<complex>
#include<queue>
#include<deque>
#include<stack>
#include<map>
#include<set>
#include<bitset>
#include<functional>
#include<assert.h>
#include<numeric>
using namespace std;
#define REP(i,m,n) for(int i=(int)(m) ; i < (int) (n) ; ++i )
#define rep(i,n) REP(i,0,n)
using ll = long long;
const int inf=1e9+7;
const ll longinf=1LL<<60 ;
const ll mod=1e9+7 ;

void solve(int n){
    int m,p;
    cin>>m>>p;
    --m;
    int s=0;
    int a[n];
    rep(i,n){
        cin>>a[i];
        s+=a[i];
    }
    if(a[m]==0)cout<<0<<endl;
    else {
        cout<<s*(100-p)/a[m]<<endl;
    }
}
int main(){
    int n;
    while(cin>>n,n!=0)solve(n);
    return 0;
}

C++: #include<cmath>
#include<iostream>
#include<algorithm>
#include<iomanip>
#include<vector>
#include<string>
#include<queue>
#include<stack>
#include<cstdio>
#include<map>
#define rep(i,n) for(int i=0;i<n;i++)
#define fori(i,k,n) for(int i=k;i<n;i++)
using namespace std;
const int dx[4] = { 0, 1, 0, -1 }, dy[4] = { 1, 0, -1, 0 };
const int dX[8] = { 0, 1, 1, 1, 0, -1, -1, -1 }, dY[8] = { 1, 1, 0, -1, -1, -1, 0, 1 };
/*
(char)'1' - (int)48 = (int)1; 


*/


int main()
{

	int n, m, p;
	cin >> n >> m >> p;
	while (n != 0 && m != 0 && p != 0)
	{
		int a[110];
		double al = 0;
		for (int i = 0; i < n; i++)
		{
			cin >> a[i];
			al += a[i]*100;
		}
		al = al*(100-p)/100;
		if (a[m - 1] == 0)
		{
			cout << 0 << endl;
		}
		else
		{
			al /= a[m - 1];
			int ans = al;
			cout << ans << endl;
		}



		cin >> n >> m >> p;
	}
}

C++: #include<iostream>

using namespace std;

int main(){

  int n,m,p,sum=0,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{

	for(int t=0;t<n;t++){

	    sum=sum+x[t];

	}

	k=100*(sum-sum*p/100);
      

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

      sum=0;
    
    }

  cout<<endl;

  return 0;
}

C++: #include <iostream>
#define REP(i, a, n) for(int i = (a); i < (n); i++)
using namespace std;

int N, M, P, A[100];
int sum;

int main(void) {
  while(cin >> N >> M >> P, N || M || P) {
    REP(i, 0, N) cin >> A[i];

    sum = 0;
    REP(i, 0, N) sum += A[i];

    if(A[M - 1] > 0) {
      int ans = 100 * sum * (1 - P / 100.0) / A[M - 1];
      cout << ans << endl;
    } else {
      cout << 0 << endl;
    }
  }
  
  return 0;
}

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

#define mp make_pair
#define pb push_back
#define REP(i,a,n) for(int i = a;i < (n);i++)
#define rep(i,n) for(int i = 0;i < (n);i++)
#define all(s) s.begin(), s.end()
#define rall(s) s.rbegin(), s.rend()
#define range(x,min,max) ((min) <= (x) && (x) <= (max))

using namespace std;

typedef long long LL;
typedef vector<int> VI;
typedef vector<vector<int> > VVI;
typedef vector<string> VS;
typedef vector<bool> VB;
typedef pair<int,int> PII;

const int DX[]={1,0,-1,0},DY[]={0,-1,0,1};

int main(){
	cin.tie(0);
   	ios::sync_with_stdio(false);
	int n, m, p;
	while(1) {
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0) break;
		int x;
		int cnt = 0;
		rep (i, n) {
			int temp;
			cin >> temp;
			if (m == i + 1) x = temp;
			cnt += temp;
		}
		int sum = 100 * cnt;
		int ans = x == 0? 0 : (sum - (sum * (p / 100.0))) / x;
		cout << ans << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

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

#define REP(i,n) for (int i = 0; i < (n); i++)
#define FOR(i,s,n) for (int i = (s); i < (n); i++)
#define ALLOF(c) c.begin(), c.end()
#define RANGEOF(c,i,n) c.begin() + (i), c.begin() + (i) + (n)
#define EPS 1e-9
#define INF 1000000000
using namespace std;

template <class T> T read() { T t; cin >> t; return t; }
template <class T> vector<T> read(int n) { vector<T> v; REP(i,n) { v.push_back(read<T>()); } return v; }
template <class T> vector<vector<T>> read(int n, int m)
{
	vector<vector<T>> v;
	REP(i,n) { v.push_back(read<T>(m)); }
	return v;
}

template <class T> void write(const T &t) { cout << t << endl; }
template <class T> void write(const T &t, const T &t2) { cout << t << ' ' << t2 << endl; }
template <class T> void write(const vector<T> &v)
{
	ostringstream ss; 
	for (auto x : v) ss << x << ' ';
	auto s = ss.str();
	cout << s.substr(0, s.length() - 1) << endl;
}

struct _Reader { template <class T> _Reader operator ,(T &rhs) { cin >> rhs; return *this; } };
#define READ(t,...) t __VA_ARGS__; _Reader(), __VA_ARGS__

void solve();
int main() { solve(); return 0; }

/// template end ///



void solve()
{
	vector<int> r;
	REP(i, 1000)
		r.push_back(i + 1);

	while (true)
	{
		READ(int, N,M,P);
		if (!(N|M|P)) { break; }
		
		auto v = read<int>(N);
		auto total = accumulate(ALLOF(v), 0);
		write(v[M-1] ? total * (100-P) / v[M-1] : 0);
	}
}