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;
#define int long long

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

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];}
		cout << ((x[m-1]) ? (sum*(100-p)/x[m-1]) : 0) << endl;
	}
        
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#define INF 100000000
using namespace std;

int main(){
  int n,m;
  double p;

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

    double sum = 0;
    int a[101] = {0};

    for(int i = 0 ; i < n ; i++ ){
      cin >> a[i];
      sum += a[i];
    }
    if(a[m-1] == 0){
      cout << '0' << endl;
      continue;
    }
    sum =sum*(1-(p/100));
    int ans = (int)(100*(sum/a[m-1]));
    printf("%d\n",ans);
  }
  return 0;
}

C++: #include <cstdio>
#include <algorithm>
#include <iostream>
#include <vector>
#include <string>
#include <cmath>
using namespace std;

int main(){
	int n,a[100],x,p,s;
	while(1){
		cin >> n >> x >> p;
		if((n==0)&&(x==0)&&(p==0)){
			return 0;
		}
		s=0;
		for(int i=0;i<n;i++){
			cin >> a[i];
			s+=a[i];
		}
		if(a[x-1]==0){
			s=0;
		}
		else{
			s=s*(100-p)/a[x-1];
		}
		cout << s <<"\n";	
	}
return 0;
}

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

int main(){

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

  return 0;
}

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

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

int main(){
  int n,m,p;
  while(cin>>n>>m>>p && (n||m||p)){
    int c=0,w,x;
    for(int i=1;i<=n;i++){
      cin>>x;
      if(i==m) w=x;
      c+=x;
    }
    if(w==0) cout<<0<<endl;
    else cout<<c*(100-p)/w<<endl;
  }

  return 0;
}

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

using namespace std;

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

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

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

C++: #include <iostream>

using namespace std;

int n,m,p;
int mem[101];

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

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <vector>
#include <utility>
#include <cstring>
using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
typedef long long ll;

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

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

int main(){
	int n,m,p,sum;
	while(cin >> n >> m >> p ,n){
		vector<int> data(n);
		sum = 0;
		for(int i=0;i<n;i++){
			cin >> data[i];
			sum+= data[i]*100;
		}
		sum = (double)(100-p)/100*sum;
		cout << (data[m-1]?sum / data[m-1]:0) << endl;
	}
}