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<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,p,x;
  int a[100];
  int sum;
  while(1){
    cin>>n>>m>>p;
    if(n==0 && m==0 && p==0) break;
    sum=0;
    for(int i=0;i<100;i++){
      a[i]=0;
    }
    for(int i=0;i<n;i++){
      cin>>x;
      a[i]=x;
      sum+=x;
    }
    if(a[m-1]!=0){
      sum=sum*(100-p);
      cout<<sum/a[m-1]<<endl;
    }
    else cout<<0<<endl;
  }
  return 0;
}

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

int main(void){
    int N,M,P,X;
    while(cin>>N>>M>>P, N|M|P){
        int sum=0,winner;
        rep1(i,N){
            cin>>X;
            sum+=X;
            if(i==M)winner=X;
        }
        if(winner)cout<<sum*(100-P)/winner<<endl;
        else cout<<0<<endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#define int long long
#define ll long long
#define fi first
#define se second
#define pb push_back
#define rep(i, s, n) for (int i = s; i < n; i++)
#define rrep(i, s, n) for (int i = (n)-1; i >= (s); i--)
#define all(a) a.begin(),a.end()
typedef pair<int,int>pint;
typedef vector<int>vint;
typedef vector<pint>vpint;
const long long MOD = 1000000007, INF = 1e17;
 
#define endl '\n'
#define IOS() ios_base::sync_with_stdio(0);cin.tie(0)
 
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;}



signed main()
{
	IOS();
	vector<int>ans;
	while(1){
		int N,M,X;
		cin>>N>>M>>X;
		if(N==0&&M==0&&X==0)break;
		int sum = 0,t = -1;
		rep(i,0,N){
			int tt;
			cin>>tt;
			if(i == M-1)t = tt;
			sum += tt;
		}
		if(t==0)ans.push_back(0);
		else ans.push_back(sum*(100-X)/t);
	}
	for(auto e:ans){
		cout<<e<<endl;
	}
}

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

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

int main()
{
  int N,M,P,X,S,i,m;
  while(cin>>N>>M>>P,N||M||P){
    S=0;
    for(i=0;i<N;i++){
      cin>>X;
      S+=X*100;
      if(i==M-1)m=X*100;
    }
    S*=100-P;
    if(m)cout<<(int)((double)S/m)<<endl;
    else puts("0");
  }
}

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		//cout << "N M P" <<endl;
		cin >> N >> M >> P;
		int money = 0;
		vector<int> 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) / (double)X[M-1];
			cout << (int)money << endl;
		}
		X.clear();
	}
}#include <iostream>
#include <vector>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		//cout << "N M P" <<endl;
		cin >> N >> M >> P;
		int money = 0;
		vector<int> 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) / (double)X[M-1];
			cout << (int)money << endl;
		}
		X.clear();
	}
}

C++: //
//  main.cpp
//  procon
//
//  Created by ???????????? on 2015/05/21.
//  Copyright (c) 2015??´ y. inoue. All rights reserved.
//

#include <iostream>
using namespace std;

int main(int argc, const char * argv[]) {
    while (true) {
        int N, M, P;
        cin >> N >> M >> P;
        if (!(N || M || P)) {
            break;
        }

        int pool = 0;
        int hit = 0;
        for (int i = 0; i < N; i++) {
            int num;
            cin >> num;
            pool += num;
            if (i == M - 1) {
                hit = num;
            }
        }

        if (hit == 0) {
            cout << 0 << "\n";
        } else {
            cout << pool * (100 - P) / hit << "\n";
        }
    }
}

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

int main()
{
  int N,M,i;
  double P,X,S,m;
  while(cin>>N>>M>>P){
    S=0.0;
    for(i=0;i<N;i++){
      cin>>X;
      S+=100.0*X;
      if(i==M-1)m=(double)M;
    }
    S*=(100.0-P)/100.0;
    if(m)cout<<(int)S/m<<endl;
    else puts("0");
  }
}

C++: #include<iostream>
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

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

C++: #include <iostream>
#include <cstdio>
#include <iomanip>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>

#include <numeric>
#include <algorithm>
#include <functional>

#include <cctype>

#include <complex>
#include <string>
#include <sstream>

using namespace std;

#define all(c) c.begin(),c.end()
#define rall(c) c.rbegin(),c.rend()
#define rep(i,n) for(unsigned int i=0;i<(n);i++)
#define tr(it,container) for(typeof(container.begin()) it = container.begin(); \
                                                  it != container.end(); ++it)

typedef long long ll;
typedef complex<double> P;
const int dx[] = {1,0,-1,0};
const int dy[] = {0,-1,0,1};
const double EPS = 1e-9;
const int days[] = {31,28,31,30,31,30,31,31,30,31,30,31};
const int daysleap[] = {31,29,31,30,31,30,31,31,30,31,30,31};

int main(){
    while(true){
        int N,M,P;
        cin >> N >> M >> P;
        if(N==0) break;
        vector<int> X(N);
        rep(i,N) cin >> X[i];
        int total = accumulate(all(X),0);
        double rest = 100 * total * ((100-P)/100.0);

        double ret = rest / X[M-1];
        cout << ret << endl;
        return 0;
    }
}

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

int main()
{
        int N,M,P;
        while(cin >> N >> M >> P, (N||M||P))
        {
                int a[200];
                int cnt=0;
                for(int i=0; i<N; i++)
                {
                        cin >> a[i];
                        cnt+=a[i];
                }

                if(a[M-1]==0) cout << 0 << endl;
                else
                {
                        cout << (int)(1.0*cnt*(100-P)/a[M-1]) << endl;
                }
        }
}

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

int main() {
	while(true){
		int n,m,p;
		cin>>n>>m>>p;
		if(n==0&&m==0&&p==0)break;
		vector<int>x(n);
		for(int i=0;i<n;i++)cin>>x[i];
		int sum=0;
		for(int i=0;i<n;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 <bits/stdc++.h>
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
#include <algorithm>
#include <utility>
#define INF INT_MAX / 2
using namespace std;

typedef pair<int, int> P;
typedef long long ll;

int main(void) {
	int N,M,P;
	while(cin >> N >> M >> P,N+M+P!=0){
	double sum = 0;
	vector<double> x(N);
	for(int i=0;i<N;i++){
		cin >> x[i];
		sum += x[i];
	}
	sum *= 100;sum *= (1-1.*P/100);
	if(x[M-1] == 0)cout << 0 << endl;
	else cout << (int)(sum / x[M-1]) << endl;
}
}

// command shift d duplicate
// command ctrl 上下
// command D
// command caps G → '' ""
// vector<vector<int>> a(N,vector<int>(M,-1));