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++: // Header {{{
// includes {{{
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <sys/time.h>
#include <unistd.h>
#include <vector>
// }}}
using namespace std;
// consts {{{
static const int INF = 1e9;
static const double PI = acos(-1.0);
static const double EPS = 1e-10;
// }}}
// typedefs {{{
typedef long long int LL;
typedef unsigned long long int ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef vector<double> VD;
typedef vector<VD> VVD;
typedef vector<bool> VB;
typedef vector<VB> VVB;
typedef vector<char> VC;
typedef vector<VC> VVC;
typedef vector<string> VS;
typedef vector<VS> VVS;
typedef pair<int, int> PII;
typedef complex<int> P;
// }}}
// macros & inline functions {{{
// syntax sugars {{{
#define FOR(i, b, e) for (typeof(e) i = (b); i < (e); ++i)
#define FORI(i, b, e) for (typeof(e) i = (b); i <= (e); ++i)
#define REP(i, n) FOR(i, 0, n)
#define REPI(i, n) FORI(i, 0, n)
#define OPOVER(_op, _type) inline bool operator _op (const _type &t) const
// }}}
// conversion {{{
inline int toInt(string s) { int v; istringstream sin(s); sin>>v; return v; }
template<class T> inline string toString(T x) { ostringstream sout; sout<<x; return sout.str(); }
// }}}
// array and STL {{{
#define ARRSIZE(a) ( sizeof(a) / sizeof(a[0]) )
#define ZERO(a, v) ( assert(v == 0 || v == -1), memset(a, v, sizeof(a)) )
#define F first
#define S second
#define MP(a, b) make_pair(a, b)
#define SIZE(a) ((LL)a.size())
#define PB(e) push_back(e)
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ALL(a) (a).begin(), (a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define EACH(c, it) for(typeof((c).begin()) it=(c).begin(); it!=(c).end(); ++it)
#define EXIST(s, e) ((s).find(e) != (s).end())
// }}}
// bit manipulation {{{
#define BIT(n) (assert(n < 64), (1ULL << (n)))
#define BITOF(n, m) (assert(m < 64), ((ULL)(n) >> (m) & 1))
inline int onbits_count(ULL b) { int c = 0; while(b != 0) { c += (b & 1); b >>= 1; } return c; }
inline int bits_count(ULL b) { int c = 0; while(b != 0) { ++c; b >>= 1; } return c; }
// }}}
// debug {{{
#define dprt(fmt, ...) if (opt_debug) fprintf(stderr, fmt, ##__VA_ARGS__)
#define darr(a) if (opt_debug) copy( (a), (a) + arrsz(a), ostream_iterator<int>(cerr, " ") ); cerr << endl
#define darr_range(a, f, t) if (opt_debug) copy( (a) + (f), (a) + (t), ostream_iterator<int>(cerr, " ") ); cerr << endl
#define dvec(v) if (opt_debug) copy( ALL(v), ostream_iterator<int>(cerr, " ") ); cerr << endl
#define darr2(a, n, m) if (opt_debug) FOR(i, 0, (n)){ darr_range( (a)[i], 0, (m) ); }
#define dvec2(v) if (opt_debug) FOR(i, 0, SZ(v)){ dvec( (v)[i] ); }
#define WAIT() if (opt_debug) { string _wait_; cerr << "(hit return to continue)" << endl; getline(cin, _wait_); }
#define dump(x) if (opt_debug) cerr << " [L" << __LINE__ << "] " << #x << " = " << (x) << endl;
#define dumpf() if (opt_debug) cerr << __PRETTY_FUNCTION__ << endl;
#define dumpv(x) if (opt_debug) cerr << " [L:" << __LINE__ << "] " << #x << " = "; REP(q, (x).size()) cerr << (x)[q] << " "; cerr << endl;
#define where() if (opt_debug) cerr << __FILE__ << ": " << __PRETTY_FUNCTION__ << " [L: " << __LINE__ << "]" << endl;
#define show_bits(b, s) if(opt_debug) { REP(i, s) { cerr << BITOF(b, s-1-i); if(i%4 == 3) cerr << ' '; } cerr << endl; }
template<typename T1, typename T2> ostream& operator<<(ostream& s, const pair<T1, T2>& d) {return s << "(" << d.first << ", " << d.second << ")";}
// }}}
// }}}
// time {{{
inline double now(){ struct timeval tv; gettimeofday(&tv, NULL); return (static_cast<double>(tv.tv_sec) + static_cast<double>(tv.tv_usec) * 1e-6); }
// }}}
// string manipulation {{{
inline VS split(string s, char delimiter) { VS v; string t; REP(i, s.length()) { if(s[i] == delimiter) v.PB(t), t = ""; else t += s[i]; } v.PB(t); return v; }
// }}}
// geometry {{{
#define Y real()
#define X imag()
// }}}
// 2 dimentional array {{{
P dydx4[4] = { P(-1, 0), P(0, 1), P(1, 0), P(0, -1) };
P dydx8[8] = { P(-1, 0), P(0, 1), P(1, 0), P(0, -1), P(-1, 1), P(1, 1), P(1, -1), P(-1, -1) };
int g_height, g_width;
bool in_field(P p) {
	return (0 <= p.Y && p.Y < g_height) && (0 <= p.X && p.X < g_width);
}
// }}}
// }}}
bool opt_debug = false;

int main(int argc, char** argv) {
	std::ios_base::sync_with_stdio(false);
	// set options {{{
	int __c;
	while ( (__c = getopt(argc, argv, "d")) != -1 ) {
		switch (__c) {
			case 'd':
				opt_debug = true;
				break;
			default:
				abort();
		}
	}
	// }}}

	int N, M, P;
	while (cin >> N >> M >> P, N || M || P) {
		int winner = 0;
		int pool = 0;
		REP (i, N) {
			int x;
			cin >> x;
			pool += x * 100;
			if (i + 1 == M) {
				winner = x;
			}
		}
		dump(winner);
		if (winner == 0) {
			cout << 0 << endl;
		} else {
			double dividend = (double)pool - (double)pool * ((double)P / 100.0);
			dump(dividend);
			cout << (int)(dividend / (double)winner)<< endl;
		}
	}
}

// vim: foldmethod=marker

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

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

C++: #include<iostream>
using namespace std;
int main() {
	int n;
	int m;
	int p;
	int answer=0;
	int x[1000];
	while (1) {
		cin >> n;
		cin >> m;
		cin >> p;
		
		if (n == 0 && m == p && p == 0) {
			break;
		}

		for (int i = 0; i < n; i++) {
			cin >> x[i];
			answer += x[i];
		}
		if (x[m - 1 ]!= 0) {
			answer = (answer*(100- p)) / x[m - 1]; 
		}
		else {
			answer = 0;
		}
		cout << answer;

	}
}

C++: #include<iostream>

using namespace std;
int main(){
  int n,m,p;
 
  while(cin>>n>>m>>p,n!=0){
    int a[2000];
    int sum=0;
    for(int i=0;i<n;i++){
      int x;
      cin>>x;
      a[i]=x;
      sum+=x;
    }
    int g=(sum*100)*(100-p)/100;
    if(a[m-1]==0)cout<<0<<endl;
    else  cout<<g/a[m-1]<<endl;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
#include <iostream>
/*cout <<"Debug"
cout <<x-30<<' '<<y-30<<endl;*/
typedef pair<pair<int ,int>, int> P;
vector<pair<pair<int ,int>, int> > v_ans;
vector<int>v_;
vector<long int>v_ansl;
/*taro tenn,hanako_ten,sum*/

bool cmp(P h, P r){
  return h.second < r.second;
}
int v[101];
int main(){
  int N,M;
  float P;

  cin >>N>>M>>P;
  while(N!=0 and M!=0 and P!=0){
    long int NUMP = 0;
    int ans = 0;
    for(int i = 0;i < N ; i++){
      cin >>v[i];
      NUMP += v[i];
    }
    NUMP *= (100-P);
    if(v[M-1] == 0){
      ans = 0;
      cout <<(int)ans<<endl;
    }
    else{
    cout <<NUMP/v[M-1]<<endl;
  }
    cin >>N>>M>>P;
  }
  return 0;
}

C++: #include <bits/stdc++.h>
#define range(i, a, b) for(int i = (a); i < (b); i++)
#define rep(i, a) range(i, 0, a)
using namespace std;

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