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;
#include <iostream>
/*cout <<"Debug"
cout <<x-30<<' '<<y-30<<endl;
typedef pair<pair<int ,int>, int> P;
vector<pair<pair<int ,int>, int> > v_ans;
vector<int>v_;
vector<long int>v_ansl;
/*taro tenn,hanako_ten,sum*/
/*
bool cmp(P h, P r){
  return h.second < r.second;
}
*/
int v[101];
int main(){
  int N,M;
  int P;

  cin >>N>>M>>P;
  while(N!=0 and M!=0 and P!=0){
    int NUMP = 0;
    int ans = 0;
    for(int i = 0;i < N ; i++){
      cin >>v[i];
      NUMP += v[i];
    }
    if(v[M-1] == 0){
      ans = 0;
      cout <<(int)ans<<endl;
    }
    else{
    cout <<100*NUMP*(100-P)/(100*v[M-1])<<endl;
  }
    cin >>N>>M>>P;
  }
  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,num[102];
		for(int i=1;i<=n;i++){
			cin>>num[i];
			sum+=num[i];
		}
		if(num[m])cout<<(int)((sum*(100-p))/num[m])<<endl;
		else cout<<0<<endl;
	}
}

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

using namespace std;

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);

	int n, m, p;
	int j = 0;
	vector<int>ans(100);

	while(1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0)
			break;
		long long sum = 0;

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

		if (x[m - 1] != 0) {
			ans[j] = (sum * 100 / x[m - 1])*(100-p)/100;
		}
		else {
			ans[j] = 0;
		}
		j++;

	} 

	for (int i = 0;i < j;i++) {
		cout << ans[i] << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>
#define REP(i,n,N) for(int i=n;i<N;i++)
#define p(S) cout<<S<<endl
using namespace std;


int main(){
	int N,M,P;
	while(cin>>N>>M>>P,N){
		int a,sum=0,win;
		REP(i,0,N){
			cin>>a;
			if(i==M) win=a;
			sum+=a*100;
		}
		sum*=100-P;
		sum/=100;
		cout<<sum/win<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<algorithm>
using namespace std;
int main()
{
	int n,m,p;
	while(cin>>n>>m>>p,n) 
	{
		int nums[n];
		fill(nums,nums+n,0);
		int sum=0;
		for(int i = 0; i < n; ++i)
		{
			cin>>nums[i];
			sum+=nums[i]*100;
		}

		double ans=0;
		if(nums[m-1]!=0)
			ans=sum*0.01*(100-p)/nums[m-1];
		cout<<(int)ans<<endl;
	}
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>

using namespace std;


#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
//wrong answer

int main(){

  while(1){

	int n,m;
	double p;
	int x[200];
	int ans;
	double sum=0;

	cin >> n >> m >> p;

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

	m--;

	REP(i,n){
	  cin >> x[i];
	  sum += x[i];
	}

	sum = sum * 100;
	if(x[m]==0){
	  ans = 0;
	}else{
	  ans = sum * (100-p)/100 / x[m];
	}

	cout << ans <<endl;

  }

}

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

#define REP(i,n) for(int i=0;i<n;i++)
#define rep(i,n) for(int i=0;i<n;i++)
#define INF 1<<29
#define LINF LLONG_MAX/3
#define MP make_pair
#define PB push_back
#define EB emplace_back
#define ALL(v) (v).begin(),(v).end()
#define debug(x) cerr<<#x<<":"<<x<<endl
#define debug2(x,y) cerr<<#x<<","<<#y":"<<x<<","<<y<<endl
#define CININIT cin.tie(0),ios::sync_with_stdio(false)
template<typename T> ostream& operator<<(ostream& os,const vector<T>& vec){ os << "["; for(const auto& v : vec){ os << v << ","; } os << "]"; return os; }

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

int main(){
    int n,m,p;
    while(cin>>n>>m>>p){
        if(n==0 and m==0 and p==0) break;
        m--;
        int sum=0;
        vector<int> x(n);
        rep(i,n){
            cin>>x[i];
            sum += x[i];
        }

        int t = sum * (100-p);

        if(x[m]==0){
            cout << 0 << endl;
            continue;
        }
        cout << t / x[m]<< endl;
    }
}

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		cin >> N >> M >> P;
		double money = 0;
		vector<double> X(N);
		if( N == 0 && M == 0 && P == 0 ) break;
		if( N == 0 || M == 0 ) continue;
		for( int i = 0; i < N; i++ ){
			cin >> X[i];
			money += X[i];
		}
		if( X[M-1] == 0 ){
			cout << 0 << endl;
		}else{
			money *= (double)(100 - P) / X[M-1];
			cout << (int)money << endl;
		}
	}
}

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

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){
		if(n == 0 && m == 0 && p == 0) break;
		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 cout << sum * (100 - p) / (vec[m-1]) << endl;
	}

	return 0;
}

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

using namespace std;

int main(){
    while(true){
        // N, M, P ?????\???
        int n, m, p;
        cin >> n >> m >> p;

        // 0 0 0 ????????????
        if(n == 0 && m == 0 && p == 0)
            return 0;

        //x ?????\???
        vector<int> x(n);
        for(auto &a:x)
            cin >> a;

        // ????????????????????????
        if(x[n - 1] == 0){
            cout << 0 << endl;
            continue;
        }

        //????¨??????????
        int sum = accumulate(x.begin(), x.end(), 0) * 100;
        //?????????????????????
        double total = sum * (100 - p) / 100;
        //????????????
        int money = total / x[m - 1];

        cout << money << endl;
    }

    return 0;
}

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

int main(){
	int n, m;
	double p;
	while (1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0) break;
		int sum = 0;
		p = p / 100;
		int winner;
		for (int i = 1; i <= n; i++){
			int c;
			cin >> c;
			if (i == m) winner = c;
			sum += c;
		}

		if (winner == 0){
			cout << 0 << endl;
			continue;
		}
		sum = sum * 100;
		cout << floor((sum*(1 - p)) / winner) << endl;
	}

	return 0;
}