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 <string>
#include <algorithm>
#include <vector>
#include <iomanip>
#include <math.h>
#include <complex>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <unordered_map>
#include <set>
#include <bitset>
#include <functional>
#include <assert.h>
using ll=long long;
#define int ll
#define rng(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,b) rng(i,0,b)
#define gnr(i,a,b) for(int i=int(b)-1;i>=int(a);i--)
#define per(i,b) gnr(i,0,b)
#define eb emplace_back
#define all(x) x.begin(),x.end()
#define SZ(x) x.size()
#define fi first
#define se second
const int INF = 1e9;
using namespace std;

template<class T> using vc=vector<T>;
template<class T> using vvc=vc<vc<T>>;

using pi=pair<int,int>;
using vi=vc<int>;

template<class T>
inline bool chmax(T &a,T b){if(a<b){a=b;return true;}return false;}
template<class T>
inline bool chmin(T &a,T b){if(a>b){a=b;return true;}return false;}

signed main() {
    cin.tie(0);
    ios::sync_with_stdio(0);
    cout<<fixed<<setprecision(20);

    while(true){
        int N,M,P; cin >> N >> M >> P;
        if(N==0 && M==0 && P==0) break;
        int A[N];
        int sum=0;
        rep(i,N) {
            cin >> A[i];
            sum+=A[i];
        }
        if(A[M-1]==0) cout << 0 << "\n";
        else cout << (sum*(100-P))/A[M-1] << endl;
    }
}

C++: #include <iostream>
#include <algorithm>
#include <cstdio>
#include <string>
#include <cstring>
#include <cctype>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <set>
#include <map>
using namespace std;

#define REP(i, s, e) for (int i = (s); i < (e); i++)
#define REPI(i, s, e) for (int i = (s); i <= (e); i++)
#define rep(i, n) REP(i, 0, n)
#define repi(i, n) REPI(i, 0, n)
#define ALL(v) (v).begin(), (v).end()

#define dump(x) (cout << #x << " = " << x << endl)
#define dump2(x, y) (cout << "(" << #x << ", " << #y << ") = (" << x << ", " << y << ")" << endl)

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

int main(void)
{
	int n, m, p;
	while (cin >> n >> m >> p, n|m|p) {
		m--;
		vector<int> xs = vector<int>(n);
		rep(i, n) cin >> xs[i];

		ll sum = 0;
		rep(i, n) sum += 100*xs[i];
		if (xs[m] == 0)
			cout << 0 << endl;
		else 
			cout << sum*(100-p)/(100*xs[m]) << endl;
	}
	return 0;
}

C++: #include<map>
#include<set>
#include<list>
#include<cmath>
#include<queue>
#include<stack>
#include<cstdio>
#include<string>
#include<vector>
#include<complex>
#include<cstdlib>
#include<cstring>
#include<climits>
#include<numeric>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<functional>
#include<iomanip>
#include<cctype>

#define MP make_pair
#define PB push_back
#define REP(i,n) for(int i=0;i<(n);i++)

using namespace std;

typedef long long LL;
typedef vector<int> VI;

const int DX[] = { 1, 0, -1, 0 }, DY[] = { 0, -1, 0, 1 };

int main(){
	int n, m, p,x,y=0;
	VI X;
	while (1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0)
			break;
		for (int i = 0; i < n; i++){
			cin >> x;
			y += x;
			X.PB(x);
		}
		if (X[m - 1] == 0)
			cout << 0 << endl;
		else
			cout << (int)(((y *100) - (y * 100 * ((float)p / 100)))/ X[m - 1]) << endl;
		y = 0;
		X.clear();
	}
	return 0;
}

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

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

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

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

int main()
{
//	cut here before submit 
//	freopen ("testcase.PG", "r", stdin );
	int n, m, p;
	while (true ){
		scanf ("%d %d %d", &n, &m, &p );
		if ((n | m | p ) == 0 ) break; 
		m--;
		vector<int> x (n, 0 );

		rep (i, n ){
			scanf ("%d", &x[i] );
		} // end rep
		int sum = accumulate(ALL (x), 0 );		// 売上
		int share = sum*(100-p);	// 配当
		int res = 0;
		if (x[m] != 0 ){
			res = share/x[m];
		} // end if
		printf ("%d\n", res );
	} // end loop
		
	return 0;
}

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

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

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){
	int sum = 0;
	vector<int> 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 << 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 <cstdio>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <string>
#include <algorithm>

using namespace std;

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

C++: #include <iostream>
#include <vector>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		//cout << "N M P" <<endl;
		cin >> N >> M >> P;
		int money = 0;
		vector<int> X(N);
		if( N == 0 && M == 0 && P == 0 ) break;
		for( int i = 0; i < N; i++ ){
			cin >> X[i];
			money += X[i];
		}
		if( X[M-1] == 0 ){
			cout << 0 << endl;
		}else{
			money *= (double)(100 - P) / (double)X[M-1];
			cout << (int)money << endl;
		}
		X.clear();
	}
}

C++: #include <stdio.h>
#include <cmath>
#include <algorithm>
#include <stack>
#include <queue>
#include <vector>

using namespace std;


int main(){

	int num,winner,rate,sum,winner_get,tmp;

	while(true){
		scanf("%d %d %d",&num,&winner,&rate);
		if(num == 0 && winner == 0 && rate == 0)break;

		sum = 0;

		for(int i = 1; i <= num; i++){
			scanf("%d",&tmp);
			sum += tmp;
			if(i == winner){
				winner_get = tmp;
			}
		}

		if(winner_get == 0){
			printf("0\n");
		}else{
			printf("%d\n",(sum*(100-rate))/winner_get);
		}
	}

	return 0;
}