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 <string>
#include <set>
#include <map>
#include <queue>
#include <stack>
#include <cmath>
#include <functional>
#include <numeric>
#include <iomanip>
#define fi first
#define se second
#define fcout(n) cout<<fixed<<setprecision((n))
#define cinl(str) getline(cin,(str))
using namespace std;
bool value(int y,int x,int R,int C){return 0<=y&&y<R&&0<=x&&x<C;}
typedef pair<int,int> pii;
typedef long long ll;
typedef vector<int> vi;
typedef vector<long long > vll;
typedef vector< vi > vvi;
double pie=acos(-1);
int INF=1000000007;
int dx[4] = { 0,-1,0,1 };
int dy[4] = { -1,0,1,0 };


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


	}
}

C++: #include<iostream>
#include<vector>
#include<list>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
using namespace std;
int main() {
	int n, m, p;
	while (cin >> n >> m >> p&&n + m + p != 0) {
		int sum = 0;
		int t = 0, x[1000];
		for (int i = 0; i < n; i++) {
			cin >> x[i];
			sum += (x[i]*100);
		}
		if (t != 0) {
			cout << floor(sum*((100.0 - p) / 100) / x[m-1]) << endl;
		}
		else cout << 0 << endl;
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	int n,m,p;
	while(cin>>n>>m>>p,n){
		int sum=0,num[101];
		for(int i=1;i<=n;i++){
			cin>>num[i];
			sum+=num[i];
		}
		if(num[m])cout<<(int)(sum*(float)(100-p)/num[m])<<endl;
		else cout<<0<<endl;
	}
}

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

int N, M, P;
int X[210];

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

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

using namespace std;

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

C++: #include <iostream>
#include <cstdlib>

#define TN_MAX 101

using namespace std;

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

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

int main(){
    int N, M, P;
    int X[102];
    int sumX;

    while(true){
        cin >> N >> M >> P;
        if(N==0 && M==0 && P==0) break;
        sumX = 0;
        for(int n=0;n<N;n++){
            cin >> X[n];
            sumX += X[n];
        }
        if(X[M-1] == 0){
            cout << 0 << "\n";
        }
        else{
            cout << sumX*(100-P) / X[M-1] << "\n";
        }
    }
    return 0;
}

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

using namespace std;

int main(){
	for(int N, M, P; cin >> N >> M >> P, N, M, P; ){
		int bet = 0;
		vector<int> l;
		for(int i = 0; i < N; i++){
			int X; cin >> X;
			l.push_back(X);	
			bet += X;
		}	
		if(l[M - 1]){cout << (bet * (100 - P) / l[M - 1]) << endl;}
		else{cout << 0 << endl;}
	}
	return 0;
}

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

int N,M,P,sum,win;

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    while(cin >> N >> M >> P,N){
        sum=0;
        for (int i=0;i<N;++i){
            int X; cin >> X;
            if (i==M-1) win=X;
            sum+=100*X;
        }
        sum=sum*(100-P)/100;
        cout << (win?sum/win:0) << endl;
    }
}

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

int main() {
	int n, m, p;
	while (scanf("%d%d%d", &n, &m, &p), n) {
		int sum = 0, t;
		for (int i = 1; i <= n; i++) {
			int x; scanf("%d", &x);
			sum += x;
			if (i == m)t = x;
		}
		if (t == 0)puts("0");
		else printf("%d\n", sum*(100 - p) / t);
	}
}

C++: #include<iostream>
#include<map>
#include<vector>
#include<algorithm>
#include<cmath>
#include<climits>
#include<ctime>
#include<cstring>
#include<iomanip>

#define ALL(v) (v).begin(),(v).end()
#define REP(i,p,n) for(int i=p;i<(int)(n);++i)
#define rep(i,n) REP(i,0,n)
#define dump(a) (cerr << #a << "=" << (a) << endl)
#define DUMP(list) cout << "{"; for(auto nth : list){ cout << nth << " ";}cout << "}" << endl;

using namespace std;

string table[]={"qwertasdfgzxcvb","yuiophjklnm"};


int main(){
	
	while(true){
		int member,winner,pool;
		int monney=0,all_monney=0,w_monney=0;

		cin >> member >> winner >> pool;
	
		if(monney==0&&winner==0&&pool==0) break;

		for(int i=1;i<=member;i++){
			cin >> monney;
			if(i==winner){
				w_monney=monney;
			}
			all_monney+=monney;
		}

		if(w_monney==0){
			cout << 0 << endl;
		}else{
			/*all_monney=(all_monney*100)-((all_monney*100)*(pool/100));
			all_monney=all_monney/w_monney;
			*/
			int sub=0;
			all_monney=all_monney*100;
			sub=(all_monney*pool)/100;
			w_monney=(all_monney-sub)/w_monney;

			cout << w_monney << endl;
		}
	}

}

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

using namespace std;

int main() {
  int n, m, p;
  while(cin>>n>>m>>p && (n||m||p)) {
    vector<int> personal;
    double percentage = p/100.0;
    int total = 0;
    for(int i=0; i<n; i++) {
      int tmp;
      cin>>tmp;
      personal.push_back(tmp);
      total += tmp;
    }
    total *=100;
    //cout<<personal[m-1]<<"!";
    double payBackD = total*(1.0-percentage);
    int payBackI = (int)payBackD;
    if(personal[m-1] > 0) {
      cout<<payBackI/personal[m-1]<<endl;
    }
    else {
      cout<<"0"<<endl;
    }
  }
}

C++: #include<iostream>

using namespace std;

int main(){

  int n,m,p,sum=0,k;

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

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

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

      if(x[m-1]==0){
	cout<<0<<endl;
      }else{

	for(int t=0;t<n;t++){

	    sum=sum+x[t];

	}

	sum=sum*100;

	k=sum-sum*p/100;
      

    
      cout<<k/x[m-1]<<endl;
      }

      sum=0;
    
    }

  cout<<endl;

  return 0;
}

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

int main(){
	int n, m, p;
	int x[100];
	while(1){
		int ans = 0;
		for(int i=0; i < 100; i++) x[i] = 0;

		cin >> n >> m >> p;

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

		for(int i=0; i < n; i++){
			cin >> x[i];
			ans+= x[i];
		}
		if(x[m-1] == 0){
			cout << 0 << endl;
			continue;
		}

		ans *= (100.0 - p) / x[m-1];

		cout << ans << endl;
	}

}

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

int main(){
  int N,M,P,Xwin,Xt,cnt;

  while(1){
    cin >> N >> M >> P;
    Xwin=0;
    Xt=0;
    cnt=0;
    if (N==0&&M==0&&P==0) break;
    for (int i=0;i<N;i++){
      cin >> Xt;
      if (M==i+1)Xwin=Xt;
      cnt+=Xt;
    }
    if (Xwin==0)cout << Xwin << endl;
    else cout << (cnt*100*(100-P)/100/Xwin) << endl;
  }
  return 0;
}