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

using namespace std;

int main(){
	for(int N, M, P; cin >> N >> M >> P, N; ){
		int bet = 0;
		vector<int> l;
		for(int i = 0; i < N; i++){
			int X; cin >> X;
			l.push_back(X);	
			bet += X;
		}	
		if(l[M - 1]){cout << (bet * (100 - P) / l[M - 1]) << endl;}
		else{cout << 0 << endl;}
	}
	return 0;
}

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

main()
{
  int N, M, P;
  while( cin >> N >> M >> P, N && M && P ) {
    int X[100];
    int 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 * (100-P) / X[M-1] / 100 << endl;
  }
}

C++: #include <cstdio>
int main() {
	int N,M,P;
	while(scanf("%d %d %d",&N,&M,&P),N) {
		double sum=0;
		int size=0;
		for(int i=0;i<N;i++) {
			int X;
			scanf("%d",&X);
			sum+=X*100;
			if(i==M-1) size=X;
		}
		sum*=(100-P)/100.0;
		if(size==0) {
			printf("0\n");
		}else {
			printf("%d\n",(int)(sum/size));
		}
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0;i<(n);i++)
#define bye return 0

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

C++: #include<iostream>
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 ; sum += X[i++] ) cin >> X[i];
    if(X[--M]) cout << sum * (100 - P) / X[M] << endl;
    else cout << 0 << endl;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,a,b) for(int i=a;i<b;i++)
#define rrep(i,a,b) for(int i=a;i>=b;i--)
typedef long long ll;
typedef vector<string> vs;
typedef vector<int> vi;

int main()
{
	while (1)
	{
		int n, m, p;
		cin >> n >> m >> p;
		if (n == 0) return 0;

		vi x(n);
		rep(i, 0, n) cin >> x[i];

		int sum = 0;
		rep(i, 0, n) sum += x[i];

		int ans;
		if (n < m)
			ans = 0;
		else
		{
			if (x[m - 1] == 0)
				ans = 0;
			else
				ans = sum * 100 * (100 - p) / 100 / x[m - 1];
		}
		cout << ans << endl;
		
	}
}

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

using namespace std;

int main(void) {
  int n, m, p;
  while (cin >> n >> m >> p, n) {
    vector<int> x(n);
    int sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> x[i];
      sum += x[i];
    }
    sum *= 100 - p;

    cout << (x[m - 1] ? sum / x[m - 1] : 0) << endl;
  }

  return 0;
}

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 * ( 100 - p ) / 100;

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

	return 0;
}

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

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

int di[4] = {1, 0, -1, 0};
int dj[4] = {0, 1, 0, -1};
using namespace std;

typedef long long ll;
typedef pair<int, int> P;
const ll INF = 1e18;

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

C++: //include
//------------------------------------------
#include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> vint;
typedef vector<vint> vvint;
typedef vector<string> vstring;
typedef pair<int, int> pint;
typedef pair<pint, int> ppint;
typedef pair<int, pint> pintp;
typedef unsigned int uint;
typedef long long llint;
typedef unsigned long long int ullint;

//container util
//------------------------------------------
#define all(a) (a).begin(),(a).end()
#define pb push_back
#define mp make_pair
#define EXIST(v,i) (find((v).begin(), (v).end(), i) != (v).end())
#define ERASE(v,i) (v).erase(remove((v).begin(),(v).end(),i),(v).end())
#define me (*this)

//repetition
//------------------------------------------
#define rep(i,s) for(int i=0; i<(int)(s); i++)

//constant
//--------------------------------------------
const int INF = 100000000;
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLEAR(a) memset((a), 0 ,sizeof(a))

//debug
#define debug(x)  cerr << #x << " = " << (x) << endl

int main() {
	while(1) {
		static int n, m, p;
		cin >> n >> m >> p;
		if(!n && !m && !p)
			break;
		float rate = 1.0 - (float)p / 100;
		vint data;
		rep(i,n) {
			static int t;
			cin >> t;
			data.pb(t);
		}
		int sum = accumulate(all(data), 0) * 100;
		int pay = data.at(m - 1) != 0 ? sum * rate / data.at(m - 1): 0;
		cout << pay << endl;
	}
	return 0;
}