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 <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>
#include <iterator>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define FOR( v, c ) for ( auto &v : c )

#define EACH( it, c ) for ( auto it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define DRANGE( c, p ) (c).begin(), (c).begin() + p, (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

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

	while ( true )
	{
		int n, m, p;
		cin >> n >> m >> p;

		if ( !( n | m | p ) )
		{
			break;
		}

		VI xs( n );
		FOR( x, xs )
		{
			cin >> x;
		}

		int total = accumulate( ALL( xs ), 0 ) * 100;
		double rest = 1. * total * ( 1. - p / 100. );

		if ( xs[ m - 1 ] == 0 )
		{
			cout << 0 << endl;
		}
		else
		{
			cout << (int)( rest / xs[ m - 1 ] ) << endl;
		}
	}

	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)
	{
		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<iostream>
#include<string>
#include<vector>
#include<utility>
#include<queue>
#include<algorithm>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<cstdlib>
#include<complex>
#define INF 2147483647
#define llINF 9223372036854775807
#define pb push_back
#define mp make_pair 
#define F first
#define S second
#define ll long long

using namespace std;
int main(){
  int n,m,p;
  while(cin>>n>>m>>p,n+m+p){
    vector<int>pl(n);
    int sum=0;
    for(int i=0;i<n;i++){
      cin>>pl[i];
      sum+=pl[i];
    }
    sum*=(100-p);
    int ans=0;
    if(pl[m-1]==0){
      ans=0;
    }else{
      ans=sum/pl[m-1];
    }
    cout<<ans<<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 <bits/stdc++.h>
using namespace std;
#include <iostream>
/*cout <<"Debug"
cout <<x-30<<' '<<y-30<<endl;*/
typedef pair<pair<int ,int>, int> P;
vector<pair<pair<int ,int>, int> > v_ans;
vector<int>v;
vector<long int>v_ansl;
/*taro tenn,hanako_ten,sum*/

bool cmp(P h, P r){
  return h.second < r.second;
}
int main(){
  int N,M;
  float P;

  cin >>N>>M>>P;
  while(N!=0 and M!=0 and P!=0){
    long int NUMP = 0;
    int ans = 0;
    for(int i = 0;i < N ; i++){
      int x;
      cin >>x;
      v.push_back(x);
      NUMP += x;
    }
    if(v[M-1] == 0){
      ans = 0;
    }
    else{
    ans = 100*NUMP*(1-(float)P/100)/v[M-1];
  }

    cout <<(int)ans<<endl;
    cin >>N>>M>>P;
    v.clear();
  }
  return 0;
}

C++: #include <iostream>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <string>

using namespace std;

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

C++: // Undone
#include <bits/stdc++.h>
#define int long long
#define double long double
#define INF 1e18
#define MOD 1000000007
using namespace std;
signed main() {
  int N, M, P;
  while (cin>>N>>M>>P, N+M+P) {
    int sum = 0, cnt;
    for (int i = 0; i < N; i++) {
      int x; cin >> x;
      sum += x;
      if (i + 1 == M) cnt = x;
    }
    int ans = (cnt == 0) ? 0 : (((100-P)/100.)*sum*100.)/cnt;
    cout << ans << endl;
  }
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)
typedef long long ll;

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

C++: #include<iostream>
#include<vector>
#include<list>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
using namespace std;
int main() {
	int n, m, p;
	while (cin >> n >> m >> p&&n + m + p != 0) {
		int sum = 0;
		int t = 0, x;
		for (int i = 0; i < n; i++) {
			cin >> x;
			sum += (x*100);
			if (i == m - 1) t = x;
		}
		if (t != 0) {
			cout << floor(sum*((100.0 - p) / 100) / t) << endl;
		}
		else cout << 0 << endl;
	}
}

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

int main(void){
	int N, M, P;
	while(scanf("%d %d %d", &N, &M, &P) != EOF && (N != 0 && M != 0 && P != 0)){
		int sum = 0;
		int *X = new int[N];
		for(int i = 0; i < N; i++){
			scanf("%d", X+i);
			sum += X[i];
		}
		if(X[M-1] == 0){
			printf("%d\n", 0);
		}else{
			printf("%d\n", (int)((sum * (100 - P)) / X[M-1]));
		}
	}
  return 0;
}

C++: #pragma GCC optimize("Ofast")
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i = 0; i < (int)(n); i++)
#define all(x) x.begin(),x.end()
const long double PI = acos(-1.0L);
const long long MOD = 1000000007LL;
// const long long MOD = 998244353LL;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<long long, long long> pll;
template<class T> inline bool chmax(T &a, T b) { if (a < b) { a = b; return true;} return false; }
template<class T> inline bool chmin(T &a, T b) { if (a > b) { a = b; return true;} return false; }
///////////////////////////////////////////////////////////////////////////////////////////////////

int main() {
    ios::sync_with_stdio(false); cin.tie(nullptr);
    while (1) {
		int N,M,P; cin >> N >> M >> P;
		if (N+M+P==0) break;
		vector<int> A(N);
		rep(i,N) cin >> A[i];
		int m = accumulate(all(A),0)*(100-P);
		if(A[--M])cout << m/A[M] << endl;
		else cout << 0 << endl;
	}
}