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<vector>
#include<algorithm>
#include<cstdio>
#include<cmath>
#include<queue>
#include<stack>
#include<map>
#include<set>

using namespace std;

typedef long long ll;
typedef pair<int,int> pii;
typedef pair<pii,int> piii;
typedef pair<ll,ll> pll;

#define reps(i,f,n) for(int i = int(f); i <= int(n); i++)
#define rep(i,n) reps(i,0,int(n)-1)
#define rrep(i,n) for(int i = n-1; i >= 0; i--)

#define all(x) (x).begin(),(x).end()
#define X first
#define Y second

#define sz size()
#define eb emplace_back


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

C++: #include <iostream>

using std::cin;
using std::cout;
using std::endl;

int main(void) {
	int N,M,P;
	
	cin >> N;
	cin >> M;
	cin >> P;

	while (N != 0 || M != 0 || P != 0) {
		int vote;
		int vote_w = -1;
		int sum_vote = 0; 
		int r;
		for (int i = 0; i < N; i++) {
			cin >> vote;
			sum_vote += vote;
			if (i+1 == M) {
				vote_w = vote;
			} 
		}
		if (vote_w > 0) {
			r = ((sum_vote*100)/vote_w) * (1-(double)P/100);
		}else {
			r = 0;
		}
		cout << r << endl; 
		
		cin >> N;
		cin >> M;
		cin >> P;
		sum_vote = 0;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

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

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

int main(){

  int N, M, P;

  while(cin >> N >> M >> P && (N || M || P)){

    int sum = 0;
    int maisu = 0, win = 0;
    double par = (double)(100 - P) / 100;

    for(int i = 1; i <= N; i++){
      cin >> maisu;
      sum += maisu;
      if(i == M) win = maisu;
    }
    if(win == 0) cout << 0 << endl;
    else    cout << (int)(sum * 100 * par) / win << 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] ? (int)(yo * (1 - (double)P / 100) / po[M]) : 0) << endl;
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(void){
    int n,m,p;
    while(1){
        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];
        }
        sum=sum*(100-p);
if(x[m-1]==0){
    cout<<"0"<<endl;
}else{       sum=sum / x[m-1];
        cout<<sum<<endl;
}
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
	int n,m,p;
	while(cin>>n>>m>>p,n,m,p){
		int ans=0,d[n];
		double sum=0.0;
		for(int i=0;i<n;i++){
			cin>>d[i];
			sum+=d[i];
		}
		sum*=100;
		sum-=sum*(p*1.0/100);
		if(d[m-1]){
			ans=sum/d[m-1];
			cout<<ans<<endl;
		}
		else
		cout<<0<<endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
 
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
 
typedef long long ll;
typedef pair<int, int> ii;


int main() {

	ll n, m, p;
	while(cin >> n >> m >> p, n, m, p){
		vector<ll> vec(n);
		ll sum = 0;
		rep(i, n){
			cin >> vec[i];
			sum += vec[i];
		}
		
		if(vec[m-1] == 0) cout << 0 << endl;
		else {
			double ans = 1.0 * sum * (100 - p) / vec[m-1];
			printf("%d\n", (int)ans);
			}
	}

	return 0;
}

C++: #include<iostream>

using namespace std;

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

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);
			if (i == m) t = x;
		}
		double a = 100.0-sum;
		sum *= a;
		if (t == 0) cout << 0 << endl;
		else cout << floor(sum / t) << endl;
	}
}

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

int 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];
    if( X[M-1] == 0 ) cout << 0 << endl;
    else cout << sum*100 * (100-P) / X[M-1] / 100 << endl;
  }
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <string>
#include <cstring>
#include <cstdlib>
#include <cstdio>
#include <cmath>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <bitset>
 
#define rep(i, n) for(int i = 0; i < (n); i++)
#define FOR(i, a, b) for(int i = (a); i < (b); i++)
#define all(v) (v).begin(), (v).end()
#define rev(s) (s).rbegin(), (s).rend()
#define MP make_pair
#define X first
#define Y second
 
using namespace std;
 
typedef long long ll;
typedef pair<int, int> P;

void fin(){
	freopen("test.txt", "r", stdin);
}

int main(){
//	fin();
	while(1){
		int n, m, p;
		cin >> n >> m >> p;

		if(!n) break;
		vector<int> x(n);
		int sum = 0;
		rep(i, n){
			cin >> x[i];
			sum += x[i];
		}

		int res = 0;
		if(x[m-1]) res = sum*(100-p)/x[m-1];

		cout << res << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
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){
		if(N == 0 && M == 0 && P == 0)  break;

		sum = 0;
		for(int i = 0; i < N; i++){
			cin >> X[i];
			sum += X[i];
		}

		P = 100 - P;

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

		cout << ans << endl;
	}
  return 0;
}

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

int main(){
	int N, M, P, x;
	
	while(1){
		int temp = 0, sum = 0;
		cin>>N>>M>>P;
		
		if(N == 0 && M == 0 && P == 0) break;
		
		for(int i = 1; i <= N; i++){
			cin>>x;
			sum += x;
			if(M == i) temp = x;
		}
		
		sum *= 100;
		sum = sum - sum * (P/100.0);
		
		if(temp)cout<<sum/temp<<endl;
		else cout<<0<<endl;
		
		
		
	}
	return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
using P = pair<int, int>;

int main() {
    while (1) {
        int n, m, p;
        cin >> n >> m >> p;
        if (!n) return 0;
        --m;
        vector<int> x(n);
        int sum = 0;
        for (int i = 0; i < n; ++i) {
            cin >> x[i];
            sum += x[i];
        }
        cout << (x[m] ? sum * (100 - p) / x[m] : 0) << "\n";
    }
}

C++: 
#include <iostream>
#include <vector>
using namespace std;
int main(){
  int n,m,p;
  while(cin >> n >> m >> p,n | m | p){
    vector<int> vec(n,0);
    for(int i = 0;i < n;i++){
      cin >> vec[i];
    }
    int sum = 0;
    for(int i = 0;i < n;i++){
      sum += vec[i];
    }
    sum = sum*(100 - p);
    if(vec[m-1] == 0)cout << 0 << endl;
    else cout << (int)(sum / vec[m-1]) << endl;
  }
  return 0;
}