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>

using namespace std;

int main()
{
  int N,M,P;

  while(1){
    int max=0;
    cin>>N>>M>>P;
    
    if(N==0 && M==0 && P==0)
      break;

    int X[]={0};

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

    max=max*(100-P);

    if(X[M-1]==0)
      cout<<0<<endl;
    else
      cout<<(int)max/X[M-1]<<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){

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

	total=total*100;
	
	double per;

	per=(100.0-p)/100.0;

	total=total*per;
	
	if(x[m]==0)
	  cout<<0<<endl;
	else
	  cout<<total/x[m]<<endl;
	
  }

}

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

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>

using namespace std;

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

    while (cin >> n >> m >> p, n || m || p) {
        int sum, w_num, x;

        sum = 0;
        for (int i = 1; i <= n; i++) {
            cin >> x;
            
            sum += x * 100;
            if (i == m) {
                w_num = x;
                if (w_num == 0)
                    cout << "0\n";
            }
        }
        if (w_num != 0)
            cout << (sum - (sum * p / 100)) / w_num << endl;
    }

    return 0;
}

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

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

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

using namespace std;

int main()
{
  while(1){
    int N,M;
    double P;
    cin>>N;
    cin>>M;
    cin>>P;

    if(N == 0 && M == 0 && P == 0){
      break;
    }

    int sum_person = 0;
    vector<int> n;
    for(int i = 0;i < N;++i){
      int j = 0;
      cin>>j;
      n.push_back(j);
      sum_person += j;
    }

    int sum = 100 * sum_person;
    int getter = n.at(M-1);
    sum = sum * ((100-P) / 100);

    int ans = 0;
    if(getter != 0){
      ans = sum / getter;
    }
  
    cout<<ans<<endl;
  }

  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
	int n,m,p;
	while(cin>>n>>m>>p &&n&&m&&p){
		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>
using namespace std;

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

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

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

    cin >> n >> m >> p; 
  }
}

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 = payBackD;
    if(personal[m-1] > 0) {
      cout<<payBackI/personal[m-1]<<endl;
    }
    else {
      cout<<"0"<<endl;
    }
  }
}

C++: #include <algorithm>
#include <iostream>
#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 << n << ' ' << m << ' ' << p << endl;
      cout << sum * (100 - p) / dl[m - 1] << endl;
    }
  }
  return 0;
}

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

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

using namespace std;

int main()
{
  while(1){
    int N,M;
    double P;
    cin>>N;
    cin>>M;
    cin>>P;
    if(N == 0 && M == 0 && P == 0){
      break;
    }

    int sum = 0;
    vector<int> n;
    for(int i = 0;i < N;++i){
      int j = 0;
      cin>>j;
      n.push_back(j);
      sum += 100 * j;
    }

    int getter = n.at(M-1);
    sum = sum * ((100-P) / 100);

    int ans;
    if(getter != 0){
      ans = sum / getter;
    }
    else{
      ans = 0;
    }
  
    cout<<ans<<endl;
  }

  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){

	int N, M, P;
	int X, ok, sum;

	while (1){

		cin >> N >> M >> P;
		if (N == 0 && M == 0 && P == 0) break;

		sum = 0, ok = 0;
		for (int i = 1; i <= N; i++){
			cin >> X;
			sum += X;
			if (i == M) ok += X;
		}

		if (ok == 0) cout << "0" << endl;
		else cout << (sum*(100-P)) / ok << endl;
	}

	return 0;

}

C++: #include<iostream>
#include<cstring>
#include<algorithm>
#include<string>
#include<vector>
#include<cstdio>
#include<cmath>
#define pb(in,tmp) in.push_back(tmp)
#define loop(i,a,b) for(int i=a;i<b;i++)
#define rep(i,b) loop(i,0,b)
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
using namespace std;
int main(){
  int n,m,p;
  while(cin>>n>>m>>p,n||m||p){
    double ans=0;
	vector<int>in(n);
	rep(i,n){cin>>in[i];ans+=in[i]*100;}
	if(!in[m-1])cout<<0<<endl;
	else{
	  ans*=(100-p)/100.0;
	  ans/=in[m-1];
	  cout<<(int)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;
		for (int i = 0; i < n; i++) {
			cin >> x;
			sum += (x*100);
			if (i == m - 1) t = x;
		}
		if (t != 0) {
			cout << floor(sum*((100.0 - p) / 100) / t) << endl;
		}
		else cout << 0 << endl;
	}
}