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++: /*Function Template*/
#include<bits/stdc++.h>
using namespace std;
typedef long long int ll;
typedef pair<ll,ll> pint;
const int MAX = 510000;
const int MOD = 1000000007;
#define rep(i, n) for(ll i = 0; i < (n); i++)
#define Rep(i, n) for(ll i = 1; i < (n); i++)
#define ALL(a)  (a).begin(),(a).end()
#define IOS ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
ll fac[MAX], finv[MAX], inv[MAX];


template<class T> inline bool chmin(T& a, T b) {
    if (a > b) {
        a = b;
        return true;
    }
    return false;
}
template<class T> inline bool chmax(T& a, T b) {
    if (a < b) {
        a = b;
        return true;
    }
    return false;
}
// テーブルを作る前処理
void COMinit() {
    fac[0] = fac[1] = 1;
    finv[0] = finv[1] = 1;
    inv[1] = 1;
    for (ll i = 2; i < MAX; i++){
        fac[i] = fac[i - 1] * i % MOD;
        inv[i] = MOD - inv[MOD%i] * (MOD / i) % MOD;
        finv[i] = finv[i - 1] * inv[i] % MOD;
    }

}
ll Len(ll n) {
  ll s=0;
  while(n!=0) s++, n/=10;
  return s;
}


ll Sint(ll n) {
  ll m=0,s=0,a=n;
  while(a!=0) s++, a/=10;
  for(ll i=s-1;i>=0;i--) m+=n/((ll)pow(10,i))-(n/((ll)pow(10,i+1)))*10;
  return m;
}


ll Svec(vector<ll> v){
  ll n=0;
  for(ll i=0;i<v.size();i++) n+=v[i];
  return n;
}


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;
}


ll Factorial(ll n){
  ll m=1;
  while(n>=1) m*=n,n--;
  return m;
}

void runlength(string s,vector<pair<char,ll>> &p){
  ll x=1;
  if(s.size()==1){
    p.push_back(pair<char,ll>(s[0],1));
  }
  for(ll i=0;i<s.size()-1;i++){
    if(s[i]==s[i+1]){
      x++;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[i],x));
      }
    }else{
      p.push_back(pair<char,ll>(s[i],x));
      x=1;
      if(i==s.size()-2){
        p.push_back(pair<char,ll>(s[s.size()-1],x));
      }
    }
  }
}




ll COM(ll n,ll k){
    if (n < k) return 0;
    if (n < 0 || k < 0) return 0;
    return fac[n] * (finv[k] * finv[n - k] % MOD) % MOD;
}

const int MAX_N=100010;
vector<bool> sieve_of_eratosthenes(){
  vector<bool> isPrime(MAX_N+1,true);
  for(int i=2;i<=MAX_N;i++){
    if(isPrime[i]){
      for(int j=2*i;j<=MAX_N;j+=i){
        isPrime[j]=false;
      }
    }
  }
  return isPrime;
}

vector<pint> prime_factorize(ll n){
  vector<pint> ans;
  for(ll p=2;p<=sqrt(n);p++){
    if(n%p!=0) continue;
    ll cnt=0;
    while(n%p==0){
      n/=p;
      cnt++;
    }
    ans.push_back(make_pair(p,cnt));
  }
  if(n!=1) ans.push_back(make_pair(n,1));
  return ans;
}

/*↓↓↓↓↓↓↓↓↓↓↓↓↓↓↓*/
int main() {
  IOS;
  while(1){
    ll n,m,x;
    cin>>n>>m>>x;
    if(n==0 && m==0 && x==0) break;
    m--;
    vector<ll> v(n);
    ll ans=0;
    rep(i,n) cin>>v[i];
    ans=Svec(v)*(100-x);
    if(v[m]==0) cout<<0<<endl;
    else cout<<ans/v[m]<<endl;
  }
}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main(){
    while(1){
        ll N, M, P;
        cin >> N >> M >> P;
        if(!N && !M && !P) break;
        M--;
        ll po[N];
        for(ll i = 0; i < N; i++) cin >> po[i];
        ll yo = 0;
        for(ll i = 0; i < N; i++) yo += po[i];
        yo *= 100;
        cout << (po[M] ? (int)(yo * (1 - (double)P / 100) / po[M]) : 0) << 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;}

int main(){

  while(1){
	int n,m,p;
	int x[200];
	int ans;
	int 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 / x[m]) * (1-p*0.01);
	}

	cout << ans <<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 = (double)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>
#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<long long>ans(10000000);

	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>
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, n, m, p){
		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>
using namespace std;

int main() {

  long long int n, m, p, input;

  while( true ) {

    cin >> n >> m >> p;

    if ( n == 0 ) break;

    vector< long long int > x;

    long long int s = 0;

    for ( long long int i = 0; i < n; i++ ) {

      cin >> input;

      s += input;

      x.push_back( input );

    }

    if ( x[m-1] == 0 ) {
      cout << 0 << endl;
    }else {
      cout << s * 100 * ( 100 - p ) / x[m-1] / 100 << endl;
    }

  }

  return 0;

}

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

using namespace std;

int main(){
	while(true){
		int n,m,p;cin >> n >> m >>p;
		m--;
		if( n == 0)break;
		vector<int> x(n);
		for(int i = 0; i < n; i++){
			int t; cin >> t;
			x[i] = t;
		}
		int sum = accumulate(x.begin(), x.end(), 0);
		int ans = x[m] == 0 ? 0 : sum * (100 - p) / x[m];
		cout << ans << endl;
	}

	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <queue>
#include <algorithm>
#define INF 100000000
using namespace std;

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


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

    int sum = 0;
    int a[101] = {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-p);
    int ans = sum/a[m-1];
    printf("%d\n",ans);
  }
  return 0;
}

C++: #include "bits/stdc++.h"

using namespace std;

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

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