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 <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 << floor(ret) << endl;
    }
    return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i = 0; i < (int)(n); i++)
#define REP(i,k,n) for(int i = k; i < (int)(n); i++)

#define vi vector<int>
#define pb push_back

typedef long long ll;
using namespace std;


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

C++: #include<iostream>
#include<map>
#include<vector>
#include<list>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<numeric>
#include<climits>
#include<ctime>
#include<cstring>
#define REP(i,p,n) for(int i=p;i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))
#define all(c) (c).begin(), (c).end()

using namespace std;

int main() {
	int N,M,P;
	double X[120];
	long long sum,ans;
	double zyun_money_per;


	while(cin >> N >> M >> P && N && M && P) {
		sum=0;
		REP(i,1,N+1) {
			cin >> X[i];
			sum+=X[i];
		}
		if (X[M] == 0) {
			cout << "0" << endl;
		}
		else {
			zyun_money_per = (100-P)*0.01;
			ans = (sum/X[M])* 100 * zyun_money_per;//切り捨て
			cout << ans << endl;
		}
	}

	return 0;
}

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

int main(){

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

}

C++: #include<iostream>
#include<cmath>
#include<cstdio>
#include<algorithm>
#include<vector>
#include<cstring>

using namespace std;

#define INF 999999999

int main(){
	int ans, n, m, p, x[101], par;
	
	int key[26] = {1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,1,1,1,1,2,1,1,1,2,1};
	while(1){
		cin >> n >> m >> p;
		if(!n)break;
		ans = 0;
		par = 0;
		for(int i= 0; i<n; i++){
			cin >> x[i];
			par+= x[i];
		}
		if(x[m-1]){
			ans = par * (100-p);
			ans = ans / x[m-1];
			cout << ans << endl;
		}
		else cout << "0" << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _all(arg) begin(arg),end(arg)

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0; }
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0; }

using namespace std;

int main(void){
	int n, m, p;
	while(cin>>n>>m>>p, n,m,p) {
		vector<int> x(n);
		int sum = 0;
		rep(i,n) {cin >> x[i]; sum+=x[i];}
		if(x[m-1]) {
			cout << (int)((sum*(100-p))/x[m-1]) << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
        
	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 v[101];
int main(){
  int N,M;
  int 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++){
      cin >>v[i];
      NUMP += v[i];
    }
    NUMP *= (100-P);
    if(v[M-1] == 0){
      ans = 0;
      cout <<(int)ans<<endl;
    }
    else{
    cout <<NUMP/v[M-1]<<endl;
  }
    cin >>N>>M>>P;
  }
  return 0;
}

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
using namespace std;
#define INF 100000000
typedef long long ll;

int X[110];

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

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

#define for_(i,a,b) for(int i=a;i<b;++i)

int main() {
	int N, M, P;
	
	while (cin >> N >> M >> P, N) {
		int win = -1, sum = 0;
		
		for_(i,0,N) {
			int X; cin >> X;
			if (i == M - 1) win = X;
			sum += X;
		}
		
		if (win == 0) cout << 0 << endl;
		else cout << (100 * sum / win) * (100 - P) / 100 << endl;
	}
	
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main(){
    while(1){
        ll N, M, P;
        cin >> N >> M >> P;
        if(!N && !M && !P) break;
        M--;
        ll po[N];
        for(ll i = 0; i < N; i++) cin >> po[i];
        ll yo = 0;
        for(ll i = 0; i < N; i++) yo += po[i];
        yo *= 100;
        cout << (po[M] ? yo * (100 - P) / (100 * po[M]) : 0) << endl;
    }
    return 0;
}

C++: #define _USE_MATH_DEFINES
#define INF 0x3f3f3f3f
#include <cstdio>
#include <iostream>
#include <sstream>
#include <cmath>
#include <cstdlib>
#include <algorithm>
#include <queue>
#include <stack>
#include <limits>
#include <map>
#include <string>
#include <cstring>
#include <set>
#include <deque>
#include <bitset>
#include <list>
#include <cctype>
#include <utility>
 
using namespace std;
 
typedef long long ll;
typedef pair <int,int> P;
typedef pair <int,P > PP;
 
int tx[] = {0,1,0,-1};
int ty[] = {-1,0,1,0};
 
static const double EPS = 1e-8;

int main(){
  int player_num;
  int winner_idx;
  int cut_off_rate;
  while(~scanf("%d %d %d",&player_num,&winner_idx,&cut_off_rate)){
    if(player_num == 0) break;
    int vote_num[101];
    int carry = 0;
    for(int i=1;i<=player_num;i++){
      scanf("%d",vote_num + i);
      carry += vote_num[i]*100;
    }
    
    carry *= (double)(100-cut_off_rate)/100.0 + EPS;
    
    printf("%d\n",vote_num[winner_idx] == 0 ? 0 : carry/vote_num[winner_idx]);
  }
  
}