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;

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();}
template<class T> inline T sqr(T x) {return x*x;}

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 pb push_back
#define mp make_pair
#define each(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define exist(s,e) ((s).find(e)!=(s).end())
#define range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 29;

int x[1010];

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

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>

#define mp       make_pair
#define pb       push_back
#define all(x)   (x).begin(),(x).end()
#define rep(i,n) for(int i=0;i<(n);i++)

using namespace std;

typedef    long long          ll;
typedef    unsigned long long ull;
typedef    vector<bool>       vb;
typedef    vector<int>        vi;
typedef    vector<vb>         vvb;
typedef    vector<vi>         vvi;
typedef    pair<int,int>      pii;

const int INF=1<<29;
const double EPS=1e-9;

const int dx[]={1,0,-1,0},dy[]={0,-1,0,1};
int n,m,p;
int main(){
  int x;
  int sum = 0;
  while(cin>>n>>m>>p,n||m||p){
    map<int,int> ma;
    rep(i,n){
      cin>>x;
      ma[i+1]+=x;
      sum +=x*100;
    }
    sum -=(sum*p)/100;
    if(ma[m]==0)
      sum = 0;
    else{
    sum /=ma[m];
    }
    cout <<sum<<endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){

  int n,m,p;
  while( cin >> n >> m >> p , n || m || p ){

    int a,b;
    int total = 0;
    bool f = false;

    for( int i = 1 ; i <= n ; i++ ){
      cin >> a; 
      if(i == m && a){
	f = true;
	b = a;
      }
      total += a;
    }
    if(f){
      total = total * 100 * (100 - p)/ (b * 100);
      printf("%.0d", total);
      cout << endl;
    }else cout << "0" << endl;
  }
  return 0;
}

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

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

C++: #include <iostream>
#include <algorithm>
 
using namespace std;
 
main(){
  int n, m, p, sum, input[100];
  while(cin >> n >> m >> p && (n|m|p)){
    sum = 0;
    for(int i=0;i<n;i++){
      cin >> input[i];
      sum += input[i] * 100;
    }
    int ans = sum *(100-p) / 100;
    if(input[m-1]) ans /= input[m-1];
    else ans = 0;
    cout << ans << 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;
        if(X[M-1] == 0) ret = 0;
        else ret = rest / X[M-1];
        if(X[M-1] == 0) ret = 0;
        int t = floor(ret);
        cout << t << endl;
    }
    return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <vector>
#include <queue>
#include <numeric>
#include <string>
#include <string.h>
#include <map>
#include <set>
#include <functional>
#include <complex>

using namespace std;

const int INF = (1<<30) - 1;


int main(){
    //ios::sync_with_stdio(false);
    //cin.tie(0);
    int n, m, p;
    while(cin >> n >> m >> p, n|m|p){
        vector<int> vec(n);
        int sum = 0;
        for(auto &v: vec){
            cin >> v;
            sum += v;
        }
        int v = vec[--m];
        cout << (v ? (100-p)*sum/v : 0) << endl;
    }
    return 0;
}

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

int main() {
  int n, m, f;
  while (cin >> n >> m >> f, n) {
    vector<int> x(n);
    rep (i, n) cin >> x[i];

    float sum = 0;
    rep (i, n) sum += 100.0*x[i];

    float ret = sum - ((float)f/100) * sum;

    int ans = ret / x[m-1];
    cout << (ans > 0 ? ans : 0) << endl;
  }

  return 0;
}

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

#define REP(i, n) for(int i = 0; i < (int) (n); i++)
#define ALL(v) (v).begin(), (v).end()

using namespace std;

int main(){
  int n, m, p;
  while(cin >> n >> m >> p and n + m + p){
    int count[n];
    REP(i, n) cin >> count[i];
    int sum = 0;
    REP(i, n) sum += count[i];
    int pool = (100 - p) * sum;
    cout << (count[m-1] == 0 ? 0 : pool / count[m-1]) << endl;
  }
  return 0;
}