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<bits/stdc++.h>

using namespace std;

int main()
{
  while(1){
    int N,M;
    double P;
    cin>>N;
    cin>>M;
    cin>>P;
    if(N == 0 && M == 0 && P == 0){
      break;
    }

    int sum = 0;
    vector<int> n;
    for(int i = 0;i < N;++i){
      int j = 0;
      cin>>j;
      n.push_back(j);
      sum += 100 * j;
    }

    int getter = n.at(M-1);
    sum = sum * (100-P) / 100;

    int ans;
    if(getter != 0){
      ans = sum / getter;
    }
    else{
      ans = 0;
    }
  
    cout<<ans<<endl;
  }

  return 0;
}

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

using namespace std;


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

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

#define rep(i, n) for (int i = 0; i < int(n); i++)
#define rrep(i, n) for (int i = int(n) - 1; i >= 0; i--)
#define reps(i, n) for (int i = 1; i <= int(n); i++)
#define rreps(i, n) for (int i = int(n); i >= 1; i--)
#define repc(i, n) for (int i = 0; i <= int(n); i++)
#define rrepc(i, n) for (int i = int(n); i >= 0; i--)
#define repi(i, a, b) for (int i = int(a); i < int(b); i++)
#define repic(i, a, b) for (int i = int(a); i <= int(b); i++)
#define each(x, y) for (auto &x : y)
#define all(a) (a).begin(), (a).end()
#define bit(b) (1ll << (b))

using namespace std;

using i32 = int;
using i64 = long long;
using u64 = unsigned long long;
using f80 = long double;
using vi32 = vector<i32>;
using vi64 = vector<i64>;
using vu64 = vector<u64>;
using vf80 = vector<f80>;
using vstr = vector<string>;

inline void yes() { cout << "Yes" << '\n'; exit(0); }
inline void no() { cout << "No" << '\n'; exit(0); }
inline i64 gcd(i64 a, i64 b) { if (min(a, b) == 0) return max(a, b); if (a % b == 0) return b; return gcd(b, a % b); }
inline i64 lcm(i64 a, i64 b) { return a / gcd(a, b) * b; }
inline u64 xorshift() { static u64 x = 88172645463325252ull; x = x ^ (x << 7); return x = x ^ (x >> 9); }
void solve(); int main() { ios::sync_with_stdio(0); cin.tie(0); cout << fixed << setprecision(16); solve(); return 0; }
template <typename T> class pqasc : public priority_queue<T, vector<T>, greater<T>> {};
template <typename T> class pqdesc : public priority_queue<T, vector<T>, less<T>> {};
template <typename T> inline void amax(T &x, T y) { if (x < y) x = y; }
template <typename T> inline void amin(T &x, T y) { if (x > y) x = y; }
template <typename T> inline T power(T x, i64 n, T e = 1) { T r = e; while (n > 0) { if (n & 1) r *= x; x *= x; n >>= 1; } return r; }
template <typename T> istream& operator>>(istream &is, vector<T> &v) { each(x, v) is >> x; return is; }
template <typename T> ostream& operator<<(ostream &os, vector<T> &v) { rep(i, v.size()) { if (i) os << ' '; os << v[i]; } return os; }
template <typename T, typename S> istream& operator>>(istream &is, pair<T, S> &p) { is >> p.first >> p.second; return is; }
template <typename T, typename S> ostream& operator<<(ostream &os, pair<T, S> &p) { os << p.first << ' ' << p.second; return os; }

void solve() {
  while (true) {
    int n, m, p; cin >> n >> m >> p;
    if (n == 0) return;
    vi32 x(n); cin >> x;
    int sum = accumulate(all(x), 0);
    if (x[m - 1] == 0) {
      cout << 0 << '\n';
    } else {
      cout << sum * (100 - p) / x[m - 1] << '\n';
    }
  }
}

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

#define rep(i,n) for(int i=0; i<n; i++)

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

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

int main(){
  int n, m, p;
  while(true){
    cin >> n >> m >> p;
    if(n == 0)
      break;

    int ave = 0,  deno, x;
    for(int i=0; i<n; i++){
      cin >> x;
      if(i+1 == m)
        deno = x;

      ave += x*100;
    }
    if(deno == 0)
      cout << 0 << endl;
    else{
      ave = ave * (100 - p) / (100*deno);
      cout << ave << endl;
    }
  }
  
  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;
const int INF = sizeof(int) == sizeof(long long) ? 1e18 : 1e9;
const int MOD = 1000000007;
const long double EPS = 1e-8;

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] == 0) {
			cout << 0 << endl;
		} else {
			int ans = sum * 100.0 * (1.0 - p / 100.0) / x[m - 1];
			cout << ans << endl;
		}
	}
	return 0;
}

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

int main() {

    int n, m, p;
    while (cin >> n >> m >> p and (n or m or p)) {

        int sum=0, hit=0;
        rep(i, n) { int t; cin >> t; sum += 100*t; if (i == m-1) hit += t; }
        if (hit == 0) cout << 0 << endl;
        else cout << (int)(sum * (100.0 - p) / 100 / hit) << endl;

    }

    return 0;

}

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

#define pb(n) push_back(n)
#define fi first
#define se second
#define all(r) (r).begin(),(r).end()
#define gsort(st,en) sort((st),(en),greater<int>())
#define vmax(ary) *max_element(all(ary))
#define vmin(ary) *min_element(all(ary))
#define debug(x) cout<<#x<<": "<<x<<endl
#define fcout(n) cout<<fixed<<setprecision((n))
#define scout(n) cout<<setw(n)
#define vary(type,name,size,init) vector< type> name(size,init)
#define vvl(v,w,h,init) vector<vector<ll>> v(w,vector<ll>(h,init));

#define rep(i,n) for(int i = 0; i < (int)(n);++i)
#define REP(i,a,b) for(int i = (a);i < (int)(b);++i)
#define repi(it,array) for(auto it = array.begin(),end = array.end(); it != end;++it)
#define repa(n,array) for(auto &n :(array))

using ll = long long;
using vi = vector<int>;
using vl = vector<ll>;
using dict = map<string,int>;
using pii = pair<int,int> ;
using pll = pair<ll,ll> ;

const int mod = 1000000007;
constexpr int imax = ((1<<30)-1)*2+1 ;
constexpr int inf = 100000000;
constexpr double PI = acos(-1.0) ;
double eps = 1e-10 ;
const int dy[] = {-1,0,1,0,1,-1,1,-1};
const int dx[] = {0,-1,0,1,1,-1,-1,1};

inline bool value(int x,int y,int w,int h){
  return (x >= 0 && x < w && y >= 0 && y < h);
}

template<typename T>
void Unique(vector<T> &v){
  sort(all(v));
  v.erase(unique(all(v)),v.end());
}

template<typename T>
T ston(string& str, T n){
  istringstream sin(str) ;
  T num ;
  sin >> num ;
  return num ;
}

void Ans(bool f){
  if(f) cout << "YES"<<endl;
  else cout << "NO"<<endl;
}

int main(){
  cin.tie(0);
  ios::sync_with_stdio(false);
  ll n,m ,p;
  while(cin >> n >> m >> p && n && m && p){
    vary(double,x,n,0);
    double pool = 0;
    rep(i,n){
      cin >> x[i];
      pool += x[i];
    }
    if(x[m-1])
      cout << int(( pool / x[m-1]) * (100-p))<<endl;
    else
      cout << 0 << endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main(){
	int N, M, P;
	int x[100];
	while(cin >> N >> M >> P, N){
		int winner = 0;
		int sum = 0;
		for(int i=0;i<N;i++){
			cin >> x[i];
			if(i+1 == M) winner = x[i];
			sum += x[i] * P;
		}
		cout << (winner ? sum/winner : 0) << endl;
	}
}