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 <vector>
#include <list>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>
#include <cassert>
#include <memory>
#include <time.h>
using namespace std;
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 vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)
const double EPS = 1e-9;
const double PI  = acos(-1.0);


int main(){
	int n,m,p;
	while(cin>>n>>m>>p,n|m|p){
		vi x(n);
		double total=0;
		REP(i,n){
			cin>>x[i];
			total+=x[i]*100;
		}
		total*=((double)(100-p)/100);
		if(x[m-1]==0){
			cout<<0<<endl;
		}else{
			cout<<(int)(total/x[m-1])<<endl;
		}
	}
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

int main (int argc, char *argv[]) {
    int n, m, p;
    int x[100];
    while (cin>>n>>m>>p, n||m||p) {
        int total = 0;
        for (int i = 0; i < n; ++i) {
            cin>>x[i];
            total += x[i];
        }
        int n = 0;
        if (x[m-1] == 0) cout<<n<<endl;
        else cout << int(100 * total * (1.0 - p/100.0) / x[m-1]) << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <string>
#include <math.h>
#include <vector>
#include<stdio.h>
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,n)  FOR(i,0,n)

using namespace std;

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

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

using namespace std;

int main()
{
    int n, m, p;
    
    while (scanf("%d %d %d", &n, &m, &p) && n){
        int s = 0, t = 0;
        
        for (int i = 1; i <= n; i++){
            int x;
            scanf("%d", &x);
            s += x;
            if (i == m) t = x;
        }
        
        printf("%d\n", t == 0 ? 0 : (s * 100 * (100 - p)) / (100 * t));
    }
    
    return (0);
}

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

#define pb         push_back

const int INF = 100000000;

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

		int sum = 0;
		int pick = -1;
		for(int i=1; i<=n; i++){
			int x;
			cin >> x;
			sum += x * 100;
			if(i == m) pick = x;
		}
		if(pick == 0){
			cout << 0 << endl;
			continue;
		}
		int ans = (sum - sum*p/100) / pick;

		cout << ans << endl;

	}
	
	return 0;
}

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

int main(){
  int n, m, p, x[101], ans;

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

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

using namespace std;

#define rep(i, n) for(int i=0; i<(n); ++i)
#define all(c) (c).begin(), (c).end()

int main(){
    int N, M, P;
    while(cin >> N >> M >> P, N|M|P){
        M--;
        vector<int> X(N);
        rep(i, N)cin >> X[i];
        cout << (X[M]? accumulate(all(X), 0) * (100 - P) / X[M]: 0) << '\n';
    }
    return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

  int n,m,p,sum=0,k;

  while(cin>>n>>m>>p){

    if(n==0&&m==0&&p==0){
      break;
    }

      int x[n];
      for(int i=0;i<n;i++){
	cin>>x[i];
      }

      if(x[m-1]==0){
	cout<<0<<endl;
      }else{

	for(int t=0;t<n;t++){

	    sum=sum+x[t];

	}

	sum=sum*100;

	k=sum-sum*p/100;
      

    
      cout<<k/x[m-1]<<endl;
      }

      sum=0;
    
    }

  return 0;
}

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, h){
      if(x[i] == 0){
	ans = 0;
	break;
      }
      if(i == m && m != 0){
	ans = (int)kekka/x[i];
      }
    }
    cout << ans << '\n';
  }
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<stack>
#include<map>
#include<set>
#include<queue>
#include<cstdio>
#include<climits>
#include<cmath>
#include<cstring>
#include<string>
#include<sstream>
#include<numeric>
#include<cassert>

#define f first
#define s second
#define mp make_pair

#define REP(i,n) for(int i=0; i<(int)(n); i++)
#define FOR(i,c) for(__typeof((c).begin()) i=(c).begin(); i!=(c).end(); i++)
#define ALL(c) (c).begin(), (c).end()
#define IN(x,s,g) ((x) >= (s) && (x) < (g))
#define ISIN(x,y,w,h) (IN((x),0,(w)) && IN((y),0,(h)))
#define print(x) printf("%d\n",x);
#define MAX (10000000)

using namespace std;

typedef unsigned int uint;
typedef long long ll;

const int _dx[] = {0,1,0,-1};
const int _dy[] = {-1,0,1,0};

int getInt(){
  int ret = 0,c;
  c = getchar();
  while(!isdigit(c)) c = getchar();
  while(isdigit(c)){
    ret *= 10;
    ret += c - '0';
    c = getchar();
  }
  return ret;
}

int main(){
  int n,m,p;
  while(n=getInt(),m=getInt(),p=getInt(), n+m+p){
    int sum = 0;
    int hit;
    m--;
    REP(i,n){
      int t = getInt();
      sum += t * 100;
      if(m == i)
        hit = t;
    }

    if(hit == 0) puts("0");
    else print((int)((((double)(100-p)/100.0) * sum)/hit));
  }
  return 0;
}