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<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
using namespace std;

#define ll long long int
#define ld long double
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define m1 cout<<"move1"<<endl
#define m2 cout<<"move2"<<endl
#define m3 cout<<"move3"<<endl
#define m4 cout<<"move4"<<endl


int main(){
  ll N,P,M;
  vector<ll> v(100);
  ll ans = 0;
  ll sum = 0;

  
  while(cin>>N>>M>>P,N,M,P){
    ans = 0;
    sum = 0;

    rep(i,N){
      v[i] = 0;
      cin>>v[i];
      sum += v[i];
    }
    if( v[M -1] != 0){
      ans = (((ld)sum * 100) * ( 100.0 - (ld)P) * 0.01) / (ld)v[M-1];
    }
    else{
      ans = 0;
    }

    cout<<ans<<endl;
  }

  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(void){
    int n,m,x;
    double p;
    while (cin>>n>>m>>p) {
        if (n==0&&m==0&&p==0) {
            break;
        } else {
            int sum=0;
            int tmp;
            for (int i=1;i<=n;i++) {
                cin>>x;
                if (i==m) {
                    tmp=x;
                }
                sum+=x;
            }
            sum=sum*100;
            double hoge=p/100;
            sum=sum-sum*hoge;
            if (tmp==0) {
                cout<<0<<endl;
            } else {
                int ans=float(sum/tmp);
                cout<<ans<<endl;
            }
        }
    }
}

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

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

  while((cin>>n>>m>>p)&&(n|m|p!=0)){
    vector<int> x(n);
    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{
      int haitou=(sum*(100-p))/x[m-1];
      cout << haitou << endl;
    }
  }
  return 0;
}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 10007;
static const int INF = 1 << 25;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { 1, -1, 0, 0,  1, -1,  1, -1 };
static const int dy[] = { 0, 0, 1, -1 , 1,  1, -1, -1 };
static const char Move[] = { 'E', 'W', 'N', 'S' };

int N, M, P, ans;
double Return = 0, percent;
VI X;

int main() {
	while ( ~scanf( "%d %d %d", &N, &M, &P ) && N && M && P ) {
		X.resize( N );
		X.reserve( N );
		percent = ( 100 - P ) * 0.01;
		for ( int i = 0; i < N; i++ ) {
			scanf( "%d", &X[ i ] );
			Return += X[ i ] * 100;
		}
		if ( X[ M - 1 ] ) {
			Return /= X[ M - 1 ];
		}
		else {
			Return = 0;
		}
		Return *= percent;
		ans = Return;
		printf( "%d\n", ans );
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i,n) for(int i=0; i<n; i++)
using namespace std;
int dy[]={1,-1,0,0};
int dx[]={0,0,1,-1};
#define MAX 100000
int main(){
    int n,m,p;
    vector<int> x;
    while(cin >> n >> m >> p,n|m|p){
        x.resize(n);
        int sum = 0;
        m--;
        int tmp;
        rep(i,n) {
            cin >> x[i];
            sum += x[i];
            if(i == m) tmp = x[i];
        }
        if(tmp == 0) cout << 0 << endl;
        else cout << sum*(100-p)/tmp << endl;
    }
    return 0;
}

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

int main(){

    while(1){
        int N, M, P;
        cin>> N>> M>> P;
        if(!(N||M||P)) break;
        int X[N];
        for(int i=0; i<N; i++) cin>> X[i];

        int s=100*accumulate(X, X+N, 0);
        int haito=s/100*(100-P);

        cout<< (X[M-1]==0? 0: haito/X[M-1])<< endl;
    }
    
    return 0;
}

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

int X[100];

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

C++: #include <iostream>
#include <iomanip>
#include <vector>
#include <string>
#include <algorithm>
#include <cctype>
#include <cmath>
#include <iomanip>

#define REP(i,n) for(int i=0;i<n;++i)
#define RREP(i,n) for(int i=n-1;i>=0;--i)
#define FOR(i,m,n) for(int i=m;i<n;++i)
#define RFOR(i,m,n) for(int i=m-1;i>=n;--i)
#define ALL(v) v.begin(),v.end()
#define PB(a) push_back(a)
#define INF 1000000001
#define MOD 1000000007

using namespace std;


int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	while (1) {
		int n, m, p, sum = 0;
		cin >> n >> m >> p;
		if (!n) break;
		vector<int> v(n);
		REP(i, n) {
			cin >> v[i];
			sum += v[i];
		}
		int geld = sum*(100-p);
		sum *= 100;
		if (v[m - 1] == 0) cout << 0 << endl;
		else cout << double(geld / v[m - 1]) << endl;
	}
	return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
  int n,m,p,o,i,j,k,b,sum;
  int card;
  cin >> n >> m >> p;
  while(n!=0){
    sum=0;
    for(i=0;i<n;i++){
      if(m-1==i){
	cin >> card;
	sum+=card;
      }else{
	cin >> b;
	sum+=b;
      }
    }
    if(card==0) cout << 0 << endl;
    else cout << ((100-p)*sum/card) <<endl;
    cin >> n >> m >> p;
  }
  
  return 0;
}

C++: #include <bits/stdc++.h>
#define rep(i, a, n) for(int i = a; i < n; i++)
#define repb(i, a, b) for(int i = a; i >= b; i--)
#define all(a) a.begin(), a.end()
#define o(a) cout << a << endl
#define int long long
#define fi first
#define se second
using namespace std;
typedef pair<int, int> P;

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