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])))
		}
	}
}

Python: while True:
    (n, m, p) = [int(x) for x in input().split()]
    if n==0 and m==0 and p==0:
        exit()
    X = []
    for i in range(n):
        X.append(int(input()))
    if X[m-1] == 0:
        print(0)
    else:
        print(int(sum(X)*(100-p)/X[m-1]))

Python: def solve(n, m, p):
    tot = 0
    a = 0
    for i in range(n):
        x = int(input())
        tot += 100 * x
        if i == m-1: a = x

    if a == 0:
        print(0)
        return

    tot = tot * (100-p) / 100.0
    ans = int(tot / a)
    print(ans)


while 1:
    n, m, p = map(int, input().split())
    if n == 0: break
    solve(n, m, p)

Python: while True:
    n = input().split()
    m = [int(i) for i in n]
    if m[0] == 0:
        break
    l = [int(input()) for k in range(m[0])]
    count = 0
    sumMoney = 0
    for count in range(m[0]):
        sumMoney += l[count]
    money = float(sumMoney * (100 - m[2]))
    try:
        pey = money / l[m[1] - 1]
        print(int(pey))
    except ZeroDivisionError :
        print('0')

Python: while True:
    n,m,p = map(int, input().split())
    if n==0:
        break
    players =[int(input()) for _ in range(n)]
    winTickets = players[m-1]
    retGld = sum(players) * (100-p)
    print(int(retGld / winTickets) if winTickets > 0 else 0)

Python: while True:
    n, m, p = map(int, input().split())
    if n == 0:
        break
    players = [int(input()) for _ in range(n)]
    gold_div = sum(players) * (100 - p)
    winner = players[m - 1]
    print(int(gold_div / winner) if winner > 0 else 0)

Python: def solve(n, m, p):
    tot = 0
    a = 0
    for i in range(n):
        x = int(input())
        tot += 100 * x
        if i == m-1: a = x

    if a == 0:
        print(0)
        return

    tot *= (100-p) / 100
    ans = int(tot // a)
    print(ans)


while 1:
    n, m, p = map(int, input().split())
    if n == 0: break
    solve(n, m, p)

Python: while 1:
    n,m,p=map(int,input().split())
    if n==0:break
    x=[int(input()) for _ in range(n)]
    print(sum(x)*(100-p)//x[m-1] if x[m-1] else 0)

C++: #include<iostream>
#include<string>
#include<vector>
#include<cmath>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<queue>
#include<ciso646>
#include<random>
#include<map>
using namespace std;
typedef long long ll;
const ll MOD = 1000000007;
const ll INF = (ll)1000000007 * 1000000007;
typedef pair<int, int> P;
typedef unsigned int ui;
int main(){
	int n, m, p,x,sum,memo=0;
	while (cin >> n >> m >> p) {
		if (n == 0)break;
		sum = 0;
		for (int i = 0; i < n; i++) {
			cin >> x; sum += x;
			if (m == i + 1)memo = x;
		}
		if (memo == 0)cout << 0 << endl;
		else cout << (100 - p)*sum / memo << endl;
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

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

C++: #include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>

#define rep(i, m, n) for(int i=int(m);i<int(n);i++)
#define all(c) begin(c),end(c)

template<typename T1, typename T2>
inline void chmin(T1 &a, T2 b) { if (a > b) a = b; }

template<typename T1, typename T2>
inline void chmax(T1 &a, T2 b) { if (a < b) a = b; }

//改造
typedef long long int ll;
using namespace std;
#define INF (1 << 30) - 1
#define INFl (ll)5e15
#define DEBUG 0 //デバッグする時1にしてね
#define dump(x)  cerr << #x << " = " << (x) << endl
#define MOD 1000000007


//ここから編集する
class Solve {
public:
    void input() {

    }

    bool sol() {
        int n, m, p;
        cin >> n >> m >> p;
        if (n == 0) return false;
        vector<int> x(n);
        rep(i, 0, n) cin >> x[i];
        int sum = accumulate(all(x), 0);
        if (x[m - 1] == 0) {
            cout << 0 << endl;
        } else {
            int ans = sum * (100 - p) / x[m - 1];
            cout << ans << endl;
        }
        return true;
    }

    void solve() {
        input();
        while (sol()) {

        }

    }
};


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);

    Solve().solve();


    return 0;
}

C++: #include <iostream>
#define llint long long

using namespace std;

llint n, m, p;
llint x[105];

int main(void)
{
	while(1){
		cin >> n >> m >> p;
		if(n == 0) break;
		for(int i = 1; i <= n; i++) cin >> x[i];
		
		if(x[m] == 0){
			cout << 0 << endl;
			continue;
		}
		
		llint sum = 0;
		for(int i = 1; i <= n; i++) sum += x[i] * 100;
		sum = sum * (100-p) / 100;
		
		cout << sum / x[m] << 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 <iostream>
#include <cstdio>
#include <algorithm>
#include <cmath>
#include <vector>
#include <queue>
#include <sstream>

using namespace std;

int main(){
	
	while(true){
		
		int N, M, P;
		
		cin >> N >> M >> P;
		if(N == 0 && M == 0 && P == 0){
			break;
		}
		
		int hit;
		int sum = 0;
		
		for(int i = 0; i < N; i++){
			int num;
			cin >> num;
			if(i + 1 == M){
				hit = num;
			}
			sum += num;
		}
		
		if(hit == 0){
			cout << "0" << endl;
		}else{
			cout << sum * (100 - P) / hit << endl;
		}
	}
	
	return 0;
}

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

int main(void) {

    int N, M, P;
    while (cin >> N >> M >> P, N || M || P) {
        vector<int> X(N);
        double sum = 0;
        for (int i = 0; i < N; i++) {
            cin >> X[i];
            sum += X[i]*100;
        }

        sum -= sum*(P/100.0);

        if (X[M-1] != 0) {
            cout << floor(sum/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);
    long long 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; 
  }
}