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>
#include <iostream>
#include <string>
#include <cmath>
#include <vector>
#include <cstring>
#include <climits>
#include <queue>
#include <algorithm>
#include <utility>
#define INF INT_MAX / 2
using namespace std;

typedef pair<int, int> P;
typedef long long ll;

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

// command shift d duplicate
// command ctrl 上下
// command D
// command caps G → '' ""
// vector<vector<int>> a(N,vector<int>(M,-1));

C++: #include <iostream>
#include <algorithm>
#include <stdlib.h>
#include <string>
#include <queue>
using namespace std;

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

}



return 0;
}

C++: #define _CRT_SECURE_NO_WARNINGS
#include <iostream>
#include <cstdio>
#include <vector>
#include <string>
#include <array>
#include <queue>
#include <deque>
#include <set>
#include <list>
#include <map>
#include <stack>
#include <utility>
#include <algorithm>
#include <numeric>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cctype>
#include <cstring>
#include <climits>
#include <bitset>
#include <random>
#include <functional>
#include <sstream>
#include <iomanip>

using namespace std;

#define rep(i, n) for(int i=0; i<(n); i++)
#define FOR(i, m, n) for(int i=(m);i<(n);i++)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define SORT(x) sort((x).begin(),(x).end())
#define REVE(x) reverse((x).begin(),(x).end())
#define mp make_pair
#define pb push_back

typedef vector<int> VI;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
typedef long long LL;

int main() {
	while (true) {
		int n, m, p;
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0)break;

		VI x(n);
		rep(i, n)cin >> x[i];

		int gold = accumulate(all(x), 0) * (100 - p);
		if (x[m - 1] == 0)gold = 0;
		else gold /= x[m - 1];

		cout << gold << endl;
	}
}

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

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

typedef std::int_fast32_t  s32;
typedef std::uint_fast32_t u32;
typedef std::int_fast64_t  s64;
typedef std::uint_fast64_t u64;

int main(void) {

  int N, M, P;
  int x[128];

  for(;;) {
    std::cin >> N >> M >> P;
    if( N == 0 and M == 0 and P == 0 ) break;

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

    s64 sum = std::accumulate(x, x+N, 0);

    s64 totalmoney = sum * 100;

    s64 sharemoney = totalmoney * (100 - P) / 100;

    s64 ans = x[M - 1] != 0 ? sharemoney / x[M - 1] : 0;

    std::cout << ans << std::endl;
  }
  
  return 0;
}

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

int Sum(const int* X, int size) {
  int sum = 0;
  for(int i = 0; i < size; i++) {
    sum += X[i];
  }
  return sum;
}

int Devide(int d, const int *X, int M) {
  if(X[M] != 0) 
    return (int)(d / X[M]);
  else
    return 0;
}

int main() {
  int N; //競技者の数
  int M; //優勝者の番号
  int P; //控除率(百分率)
  vector<int> X;
  int deduction;

  while(1) {
    cin >> N >> M >> P;
    if(N == 0 && M == 0 && P == 0)
      break;
      
    for(int i = 0; i < N; i++) {
      int x;
      cin >> x;
      X.push_back(x);
    }
    
    deduction = Sum(&X.front(), X.size()) * (100-P);
    cout << Devide(deduction, &X.front(), M-1) << endl;
    X.clear();
  }

}

C++: #include <iostream>

using namespace std;

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

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

#define max(a,b) ((a)>(b)?(a):(b))
#define min(a,b) ((a)<(b)?(a):(b))
#define abs(a) max((a),-(a))
#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define repe(i,n) rep(i,(n)+1)
#define per(i,n) for(int i=(int)(n)-1;i>=0;i--)
#define pere(i,n) rep(i,(n)+1)
#define all(x) (x).begin(),(x).end()
#define SP <<" "<<
#define RET return 0
#define MOD 1000000007
#define INF 1000000000000000000

typedef long long LL;
typedef long double LD;

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

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

int main(){
	int N, M, P, X;
	int i, size;
	double rate, sum;
	
	cin >> N >> M >> P;
	while(N!=0 && M!=0 && P!=0){
		vector<int> v;
		size=0;
		sum=0.0;
		rate=(100-P)/100.0;
		
		for(i=0; i<N; ++i){
			cin >> X;
			sum+=100*X;
			size+=X;
			v.push_back(X);
		}
		sum*=rate;
		//cout << "sum=" << sum << endl;
		//for(i=0; i<N; ++i) cout << v[i] << endl;
		
		if(v[M-1]==0) cout << 0 << endl;
		else cout << (int)sum/v[M-1] << endl;
		
		cin >> N >> M >> P;
	}
	return 0;
}

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

void solve(int n,int m,int p){
    vector<int> v;
    int a;
    int sum=0;
    for(int i=0;i<n;i++){
        cin >> a;
        sum+=a;
        v.push_back(a);
    }
    if(v[m-1]) cout<<(sum*p/v[m-1])<<endl;
    else cout<<0<<endl;
}


int main(void){
    int a,b,c;
    while(cin>>a>>b>>c,a){
        solve(a,b,c);
    }
    
}

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;
#define long long int

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

C++: #include<iostream>
#include<map>
#include<vector>
#include<list>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<numeric>
#include<climits>
#include<ctime>
#include<cstring>
#define REP(i,p,n) for(int i=p;i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))
#define all(c) (c).begin(), (c).end()

using namespace std;

int main() {
	int N,M,P;
	double X[120];
	long long sum,ans;
	double zyun_money_per;


	while(cin >> N >> M >> P && N && M && P) {
		sum=0;
		REP(i,1,N+1) {
			cin >> X[i];
			sum+=X[i];
		}
		if (X[M] == 0) {
			cout << "0" << endl;
		}
		else {
			zyun_money_per = (100-P)*0.01;
			ans = (sum/X[M])* 100 * zyun_money_per;//切り捨て
			cout << ans << endl;
		}
	}

	return 0;
}