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 <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

typedef vector<int> vi;
typedef pair<int,int> pii;
typedef long long ll;

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back

int card[200]={};


int solve(int n,int k){
    int maxi=-1;
    
    int now=1;
    rep(i,k){
        now*=card[i];
    }
    for(int i=1;i<n-k+1;i++){
        now=now/card[i-1]*card[i+k-1];

        maxi=max(maxi,now);
    }
    return maxi;
}

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

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		cin >> N >> M >> P;
		double money = 0;
		vector<double> X(N);
		if( N == 0 && M == 0 && P == 0 ) break;
		for( int i = 0; i < N; i++ ){
			cin >> X[i];
			money += X[i];
		}
		if( X[M-1] == 0 ){
			cout << 0 << endl;
		}else{
			money *= (double)(100 - P) / X[M-1];
			cout << (int)money << endl;
		}
	}
}

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,num[101];
		for(int i=1;i<=n;i++){
			cin>>num[i];
			sum+=num[i];
		}
		sum*=100-p;
		sum/=num[m];
		if(num[m])cout<<max(sum,100)<<endl;
		else cout<<0<<endl;
	}
}

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

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

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,p;
  while(cin>>n>>m>>p,n){
    int sum=0;
    int x[n+1];
    for(int i=1;i<=n;++i){
      cin>>x[i];
      sum+=x[i];
    }
    sum*=100-p;
    if(x[m])
      cout<<sum/x[m]<<endl;
    else
      cout<<0<<endl;
  }
  return 0;
}

C++: #include<cstdio>
#include<cstring>
#include<vector>
#include<queue>
#include<algorithm>
#include<cmath>
#include<climits>
#include<string>
#include<set>
#include<map>
#include<iostream>
using namespace std;
#define rep(i,n) for(int i=0;i<((int)(n));i++)
#define reg(i,a,b) for(int i=((int)(a));i<=((int)(b));i++)
#define irep(i,n) for(int i=((int)(n))-1;i>=0;i--)
#define ireg(i,a,b) for(int i=((int)(b));i>=((int)(a));i--)
typedef long long int lli;
typedef pair<int,int> mp;

int main(){

  int n,m;
  int p;
  int x[200];
  while(scanf("%d%d%d",&n,&m,&p),n | m){
    fill(x,x+200,0);
    int sum = 0;
    rep(i,n){ scanf("%d",&x[i]); sum+=x[i];}
    sum*=100;
    //printf("%f\n",(float)(p/100.0));
    sum = sum - sum * (float)(p /100.0);
    if(x[m-1]==0) printf("0\n");
    else printf("%d\n",sum/x[m-1]); 
  }

  return 0;

}

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n,m,r;
  while(cin>>n>>m>>r,n||m||r){
    double sum=0;
    vector<int>in(n);
    rep(i,n){cin>>in[i];sum+=in[i];}
    sum*=(100-r);
    if(in[m-1])cout<<(int)(sum/in[m-1])<<endl;
    else cout<<0<<endl;
  }


}

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

int main(){
  while(true){
    int n, m, p;
    cin >> n >> m >> p;
    if(n == 0 && m == 0 && p == 0)break;
    int x[1000];
    x[0] = 0;
    int gol = 0;
    int h = 0;
    double kekka = 0.0;
    
    rep(i, n){
      cin >> x[i];
      h += x[i];
      gol += 100 * x[i];
    }
    kekka = gol - gol*p/100;
    int ans = 0;
    rep(i, n){
      if(x[i] == 0){
	ans = 0;
	break;
      }else if(i == m){
	ans = (int)kekka/x[i];
      }
    }
    cout << ans << '\n';
  }
}

C++: #include <iostream>

using namespace std;

int main()
{
  int N,M,P;

  while(1){
    int max=0;
    cin>>N>>M>>P;
    
    if(N==0 && M==0 && P==0)
      break;

    int X[]={0};

    for(int i=0;i<N;i++){
      cin>>X[i];
      max+=X[i];
    }

    max=max*(100-P);

    if(X[M-1]==0)
      cout<<0<<endl;
    else
      cout<<(max/X[M-1])<<endl;
  }

  return 0;
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<bitset>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

#define MOD 1000000007
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL

int main() {
	int s, a;
	for (int N, M, P; cin >> N >> M >> P&&N;) {
		s = 0;
		for (int i = 1; i <= N; i++) {
			int X; cin >> X;
			s += X;
			if (i == M)	a = X;
		}
		cout << (a ? s*(100 - P) / a : 0) << 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<iostream>
using namespace std;
int n,m,p;
main()
{
	while(cin>>n>>m>>p,n)
	{
		int cnt=0,x[100];
		for(int i=0;i<n;i++)
		{
			cin>>x[i];
			cnt+=x[i];
		}
		cout<<(x[m-1]?cnt*(100-p)/x[m-1]:0)<<endl;
	}
}

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

int main(){
  while(true){
    int n, m, p;
    cin >> n >> m >> p;
    if(n == 0 && m == 0 && p == 0)break;
    int x[1000];
    x[0] = -1;
    int gol = 0, h = 0;
    rep(i, n){
      cin >> x[i];
      h += x[i];
      gol += 100 * x[i];
    }
    gol = gol - gol*p/100;
    int ans = 0;
    rep(i, n){
      if(i == m){
	ans = gol/x[i];
      }
    }
    cout << ans << '\n';
  }
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **)
{
	int n, m, t = -1, tmp;
	float p, s;
	
	while(1){
		cin >> n >> m >> p;
		if(n == 0){
			break;
		} else if(t != -1){
			cout << endl;
		}
		
		p = 1.0 - p/100;
		s = 0;
		for(int i = 1; i <= n; i++){
			cin >> tmp;
			s += tmp*100;
			if(i == m){
				t = tmp;
			}
		}
		
		if(t == 0){
			cout << "0";
			continue;
		}
		
		cout << (int)(p*s/t);
	}
	
	return 0;
}