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>
#include <cstdio>

using namespace std;

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

    if (N == 0) { break; }

    int atari_count;
    int ticket_count = 0;
    for (int i = 0; i < N; i++) {
      int input;
      cin >> input;
      ticket_count += input;
      if (i+1 == M) { atari_count = input; }
    }

    if (atari_count != 0) {
      printf("%d", 100 * ticket_count * (100 - P) / 100 / atari_count);
    } else {
      printf("0");
    }
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

class Solver {
    public:
        int n, m, p;
        int x[100];
        int solve() {
            int gold = 0;
            for (int i = 0; i < n; ++i) {
                gold += x[i] * 100;
            }
            if (x[m - 1] == 0) {
                return 0;
            }
            return gold / 100 * (100 - p) / x[m - 1];
        }
};

int main() {
    Solver s;
    while (true) {
        cin >> s.n >> s.m >> s.p;
        if (s.n == 0) {
            return 0;
        }
        for (int i = 0; i < s.n; ++i) {
            cin >> s.x[i];
        }
        cout << s.solve() << endl;
    }
}

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

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

    while( cin >> n >> m >> p )
    {
        if( n + m + p == 0 )
            break;
    
        int sum = 0, win = 0, cnt = 0;
        for( int i = 0; i < n; i++ )
        {
            cnt++;
            cin >> d;

            if( m == cnt )
                win = d;

            sum += d;
        
        }
        if( win == 0 )
            cout << win << endl;
        else
            cout << sum * ( 100 - p ) / win << endl;
    }
    return 0;
}

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

// ?????¬???????????¬??????
#pragma region MACRO
#define P(x) cout << (x) << endl
#define p(x) cout << (x)
#define PED cout << "\n"
#define rep(i,n) for(int i=0; i<(int)n; ++i)
#define REP(i,x,n) for(int i=x; i<(int)n; ++i)
#define repi(i,n) for(int i=0; i<=(int)n; ++i)
#define REPI(i,x,n) for(int i=x; i<=(int)n; ++i)
#define ILP while(true)
#define FOR(i,c) for(__typeof((c).begin())!=(c).begin(); i!=(c).end(); ++i)
#define ALL(c) (c).begin(), (c).end()
#define mp make_pair
#pragma endregion

// ???
#pragma region TYPE_DEF
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<string, string> pss;
typedef pair<string, int> psi;
typedef pair<int, string> pis;
typedef vector<int> vi;
typedef vector<double> vd;
typedef vector<long double> vld;
typedef vector<long> vl;
typedef vector<long long> vll;
typedef vector<string> vs;
#pragma endregion

// Effective std
#pragma region ESTD
template<typename C, typename T> int count(C& c, T t) { return count(ALL(c), t); }
template<typename C, typename F> int count_if(C& c, F f) { return count_if(ALL(c), f); }
template<typename C, typename T> void erase(C& c, T t) { remove(ALL(c), t), c.end(); }
template<typename C> void remove(vector<C>& c, unsigned int index) { c.erase(c.begin()+index); }
template<typename C, typename T, typename U> void replace(C& c, T t, U u) { replace(ALL(c), t, u); }
template<typename C, typename F, typename U> void replace_if(C& c, F f, U u) { (ALL(c), f, u); }
template<typename C> void reverse(C& c) { reverse(ALL(c)); }
template<typename C> void sort(C& c) { sort(ALL(c)); }
template<typename C, typename Pred> void sort(C& c, Pred p) { sort(ALL(c), p); }
#pragma endregion

// ?????°
#pragma region CONST_VAL
constexpr int PI = (2*acos(0.0));
constexpr int EPS = (1e-9);
constexpr int MOD = (int)(1e9+7);
constexpr int INF = 100000000;
#pragma endregion


int main()
{
    int n, m, p;
    while(cin>>n>>m>>p, n&&m&&p) {
        vi v(n);
        rep(i,n) cin >> v[i];
        if(v[m-1]==0) {
            cout << 0 << endl;
            continue;
        }
        int sum = accumulate(ALL(v), 0) * 100;
        sum -= sum*0.01*p;
        cout << sum/v[m-1] << endl;
    }
    return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <cmath>
#include <ctype.h>
#include <string> 
#include <sstream>
#include <iostream>
#include <algorithm>
#include <cstdlib>
#include <map>
#include <queue>
#include <utility>
#include <vector>
#include <set>
 
using namespace std;

int main()
{
    int n, m, p;
    while(1){
        cin >> n >> m >> p;
        if(n == 0) break;
        int x[100];
        int sum = 0;
        for(int i = 0; i < n; i++){
            cin >> x[i];
            sum += x[i] * 100;
        }
        int ans;
        if(x[m - 1] == 0) ans = 0;
        else ans = (sum * (100 - p)) / (100 * x[m - 1]);
        cout << ans << 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 <bits/stdc++.h>
using namespace std;

#define for_(i,a,b) for(int i=a;i<b;++i)

int main() {
	int N, M, P;
	
	while (cin >> N >> M >> P, N) {
		int win = 0, sum = 0;
		
		for_(i,0,N) {
			int X; cin >> X;
			if (i == M - 1) win = X;
			sum += X;
		}
		
		if (win == 0) cout << 0 << endl;
		else {
			double ans = (100.0 * sum) / (double)win;
			ans *= (double)(100 - P);
			ans /= 100.;
			cout << (int)ans << endl;
		}
	}
	
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>
#include <fstream>
#include <bitset>
#include <time.h>

using namespace std;

typedef long long ll;
typedef pair<ll, ll> P;
typedef vector<ll> V;
typedef complex<double> Point;

#define PI acos(-1.0)
#define EPS 1e-10
const ll INF = (1LL << 31) - 1;
const ll MOD = 1e9 + 7;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REP(i,N) for(int i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define EQ(a,b) (abs((a)-(b))<EPS)
#define EQV(a,b) ( EQ((a).real(), (b).real()) && EQ((a).imag(), (b).imag()) )
#define fi first
#define se second
#define N_SIZE (1LL << 20)
#define NIL -1
#define MAX_N 100100 * 3

int n, m, p;

int main() {
	while (cin >> n >> m >> p&&n + m + p) {
		double x = 0;
		double sum = 0;
		REP(i, n) {
			double y;
			cin >> y;
			sum += y * 100;
			if (i + 1 == m)x = y;
		}
		if (x == 0) {
			cout << 0 << endl;
			continue;
		}
		sum *= (100 - p);
		sum /= 100;
		sum /= x;
		cout << (int)sum << endl;
	}
}

C++: 
int N, M, P;
int xi[100], xsum;

int main(){
	int i;
	int result;
	while(1){
		scanf("%d%d%d", &N, &M, &P);
		if(N == 0 && M == 0 && P == 0)break;
		xsum = 0; M--;
		for(i = 0; i < N; i++){
			scanf("%d", &xi[i]);
			xsum += xi[i];
		}
		if(xi[M] == 0){
			result = 0;
		}else{
			result = 100*xsum*(100-P)/100/xi[M];
		}
		printf("%d\n", xi[M]?result:0);
	}
	return 0;
}