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;
#define min(a,b) ((a)<(b)?(a):(b))
#define max(a,b) ((a)>(b)?(a):(b))
#define REP(i,n) for(int i=0;i<n;i++)
#define FOR(i,n1,n2) for(int i=n1;i<n2;i++)
#define bFOR(i,n1,n2) for(int i=n1;i>=n2;i--)
#define speed_up    ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0);

typedef long long int ll;
typedef pair<int,int> Pi;
const int INF=(ll)(1LL<<30)-1;
const double INFd=100000000000.0;
const ll INFl=(ll)9223372036854775807;
const int MAX=10000;
const ll MOD=(ll)1e9+7;
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;}
int dx[4]={0,1,0,-1},dy[4]={-1,0,1,0};

template<typename A, size_t N, typename T>
void Fill(A (&array)[N], const T &val){
    std::fill( (T*)array, (T*)(array+N), val );
}

int n,m,p;
int x[110];
vector<int> ans;

int main(){
	while(1){
		int sum=0;
		cin>>n>>m>>p;
		if(n==0&&m==0&&p==0)break;
		REP(i,n){
			cin>>x[i];
			sum+=x[i];
		}
		sum*=100;
		if(x[m-1]==0){
			ans.push_back(0);
		
			continue;
		}
		sum=sum*(100-p)/100;
		ans.push_back(sum/x[m-1]);
	}
	REP(i,ans.size())
		cout<<ans[i]<<endl;
	return 0;
}

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

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

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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#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(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-6;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

const int64 mod = 1e9+7;

int main(void){
	int32 n, m, p;
	while(cin >> n >> m >> p && (n || m || p)){
		vector<int32> x(n);
		int32 sum = 0;
		REP(i, n){
			cin >> x[i];
			sum += x[i];
		}
		int32 res = 0;
		if(x[m-1] != 0){
			sum = (sum*100-sum*p);
			while(res*x[m-1] <= sum) res++;
			res--;
		}
		else res = 0;
		cout << res << endl;
	}
}

C++: #include <algorithm>
#include <iostream>
#include <limits.h>
#include <stdlib.h>
#include <string>
#include <vector>

#define el endl
#define fd fixed
#define INF INT_MAX/2-1

using namespace std;

int main() {
  int n, m, p, x, sum, num;
  while (cin >> n >> m >> p, n | m | p) {
    sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> x;
      sum += x;
      if (i == m-1) num = x;
    }
    if (num == 0) cout << num << el;
    else cout << sum*(100-p)/num << el;
  }
}

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	int n,m,p;
	while(cin>>n>>m>>p,n){
		int sum=0,num[100];
		for(int i=0;i<n;i++){
			cin>>num[i];
			sum+=num[i];
		}
		if(num[m-1])cout<<(int)(sum*(float)(100-p)/num[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 || M || P){
    int x = 0, y;
    for(int i = 0; i < N; i++){
      int X;
      cin >> X;
      x += X;
      if(i+1 == M) y = X;
    }
    if(y == 0) cout << 0 << endl;
    else cout << x  * (100 - P) / y << 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 || (N == 0 && M == 0 && P == 0)){

		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<iostream>
main(){for(int N,M,P,X,S,i,m=0;std::cin>>N>>M>>P,N;m?printf("%d\n",S*(100-P)/m):puts("0"))for(S=i=0;i<N;S+=X*100,i++-M+1||(m=X*100))std::cin>>X;}

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

int main(){

  int n,m,p;
  double sum;    //maisuu
  int hit;
  int x;
  
  while(cin >> n >> m >> p){
    if(n==0&m==0&&p==0){ break; }

    sum = 0;
    hit=0;


    for(int i=1; i<=n; i++){
      cin >> x;
      sum+=x;
      if(i==m){ hit=x; }
    }

    sum = sum*100 * ((100-p)/100.0);

    // cout << "sum=" << sum << endl;

    if(hit==0)
      cout << 0 << endl;
    else
      cout << sum/hit << endl;

  }

  return 0;
}

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

int main(void) {
	int N, M, P, X, per_m, champ = 0;
	double sum_money = 0;

	while (cin >> N >> M >> P, N | M | P) {
		per_m = champ = sum_money = 0;

		for (int i = 1; i <= N; i++) {
			cin >> X;
			if (i == M) champ = X;
			sum_money += X;
		}
		sum_money = sum_money * 100 - sum_money * (double)P;
		if (champ != 0) {
			per_m = sum_money / champ;
		} else {
			per_m = 0;
		}
		cout << per_m << 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 - P) / X[M]) << endl;
        }
    }
}

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

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

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 namespace std;
int main(){

  int N,M,P,player[100];
  int sum_ticket;
  
  while(1){
    
    cin >>N>>M>>P;
    
    if(N==0 && M==0 && P==0)break;
    
    sum_ticket=0;
    
    for(int i=0 ; i < N ; i++){
      cin >>player[i];
      sum_ticket+=player[i];
    }

    if(player[M-1] != 0){
      cout <<(sum_ticket*(100-P))/player[M-1]<<endl;
    }else{
      cout <<"0"<<endl;
    }
    
  }
  
  
  return 0;
}

C++: #include<bits/stdc++.h>
using namespace std;
int main(){
  int n,m,p,b,sum;
  int card;
  cin >> n >> m >> p;
  while(n!=0){
    sum = 0;
    for(int 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;



  }
}