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 <cstdio>
#include <string>
#include <cstring>
#include <algorithm>
#include <iostream>
using namespace std;

int main(void){
	int N, M, P;
	int sum, ans;
	int X[1001];
	while(scanf("%d %d %d", &N, &M, &P) != EOF && (N != 0 && M != 0 && P != 0)){
		sum = 0;
		for(int i = 0; i < N; i++){
			scanf("%d", X+i);
			sum += X[i];
		}

		P = 100 - P;

		if(X[M-1] == 0)	ans = 0;
		else ans = sum * P / X[M-1];

		printf("%d\n", ans);
	}
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int mod = 1e9 + 7;
const int inf = (1 << 30) - 1;
const ll infll = (1LL << 61) - 1;
#define fast() ios::sync_with_stdio(false), cin.tie(0), cout.tie(0)
#define digit(N) cout << fixed << setprecision((N))

int N, M, P;

int main()
{
    while (cin >> N >> M >> P)
    {
        if (N == 0 && M == 0 && P == 0)
            return 0;
        int sum = 0, people = 0;
        vector<int> a(N);
        for (int i = 0; i < N; i++)
        {
            cin >> a[i];
            sum += a[i] * 100;
            people += a[i];
        }
        if (a[M - 1] == 0)
        {
            cout << 0 << "\n";
        }
        else
        {
            sum -= sum * P / 100;
            cout << sum / a[M - 1] << "\n";
        }
    }
}

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

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

using namespace std;

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

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 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];
        }
        double money=sum*100;
        money*=(double)(100-p)/100;
       
        if(num[m-1]!=0)
            cout<<(int)(money/num[m-1])<<endl;
        else
            cout<<"0"<<endl;
       
    }
   
    return 0;
}

C++: #include <cstdio>
#include <cmath>
#include <cstring>
#include <cstdlib>
#include <climits>
#include <ctime>
#include <queue>
#include <stack>
#include <algorithm>
#include <list>
#include <vector>
#include <set>
#include <map>
#include <iostream>
#include <deque>
#include <complex>
#include <string>
#include <iomanip>
#include <sstream>
#include <bitset>
#include <valarray>
#include <iterator>
using namespace std;
typedef long long int ll;
typedef unsigned int uint;
typedef unsigned char uchar;
typedef unsigned long long ull;
typedef pair<int, int> pii;
typedef vector<int> vi;

#define REP(i,x) for(int i=0;i<(int)(x);i++)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();i++)
#define RREP(i,x) for(int i=((int)(x)-1);i>=0;i--)
#define RFOR(i,c) for(__typeof((c).rbegin())i=(c).rbegin();i!=(c).rend();i++)
#define ALL(container) container.begin(), container.end()
#define RALL(container) container.rbegin(), container.rend()
#define SZ(container) ((int)container.size())
#define mp(a,b) make_pair(a, b)
#define UNIQUE(v) v.erase( unique(v.begin(), v.end()), v.end() );

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }
template<class T> ostream& operator<<(ostream &os, const vector<T> &t) {
os<<"["; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"]"; return os;
}
template<class T> ostream& operator<<(ostream &os, const set<T> &t) {
os<<"{"; FOR(it,t) {if(it!=t.begin()) os<<","; os<<*it;} os<<"}"; return os;
}
template<class S, class T> ostream& operator<<(ostream &os, const pair<S,T> &t) { return os<<"("<<t.first<<","<<t.second<<")";}

const int INF = 1<<28;
const double EPS = 1e-8;
const int MOD = 1000000007;


int N, M, P;

main(){
	while(cin >> N >> M >> P, N){
		int t, sum = 0;
		REP(i, N){
			int x;
			cin >> x;
			sum += x;
			if(i == M-1) t = x;
		}
		sum *= (100-P);
		cout << (t?sum/t:0) << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define p(S) cout<<S<<endl
using namespace std;


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

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



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

  
  while(true){
    cin >> N >> M >> P;

    if(N + M + P == 0) break;
    
    int a,X, sum=0;

    for(int i=0;i<N;++i){
      cin >> a;
      sum += a;
      
      if(i == M-1){
	X = a;
      }
    }
    
    sum = sum*(100 - P);
    if(X==0){cout<<0<<endl; continue;}
    
    cout << sum/X << endl;
      
  }
  
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
using vi=vector<int>;
using vvi=vector<vi>;
using vs=vector<string>;
#define rep(i,n) for(int i=0;i<n;i++)
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()

int main(void){
    int n,m,p;
    while(cin>>n>>m>>p,n){
        double t=0,h=0;
        rep(i,n){
            int s; cin>>s;
            if(i+1==m)h=s;
            t+=s;
        }
        cout<<floor(h?t*(100-p)/h:0)<<endl;
    }
}