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

C++: #include <bits/stdc++.h>
using namespace std;
#define FOR(i, s, n) for(int i = s; i < (int)n; i++)
#define per(i, n) for(int i = n; i >= 0; i--)
#define ROF(i, s, n) for(int i = s; i >= (int)n; i--)
#define FORIT(i, A) for (auto i : A)
#define PRINT(x) cout << (x) << "\n"
#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define MP make_pair
#define EACH(i, n) for (__typeof((n).begin()) i = (n).begin(); i != (n).end(); ++i)
#define SZ(a) int((a).size())
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define CLR(a) memset((a), 0 ,sizeof(a))
#define dump(x) cout << #x << " = " << (x) << "\n";
#define debug(x) cout << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << "\n";
#define sq(n) (n) * (n)
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef long long LL;
typedef vector<LL> VLL;
typedef vector<VLL> VVLL;
typedef unsigned int uint;
typedef unsigned long long ull;
typedef priority_queue<int> maxpq;
typedef priority_queue< int, vector<int>, greater<int> > minpq;
static const double EPS = 1e-10;
static const double PI = acos( -1.0 );
static const int mod = 10007;
static const int INF = 1 << 25;
static const LL LL_INF = 1152921504606846976;
static const int dx[] = { 1, -1, 0, 0,  1, -1,  1, -1 };
static const int dy[] = { 0, 0, 1, -1 , 1,  1, -1, -1 };
static const char Move[] = { 'E', 'W', 'N', 'S' };

int N, M, P, ans;
double Return = 0, percent;
VI X;

int main() {
	while ( ~scanf( "%d %d %d", &N, &M, &P ) && N && M && P ) {
		X.resize( N );
		X.reserve( N );
		percent = ( 100 - P ) * 0.01;
		for ( int i = 0; i < N; i++ ) {
			scanf( "%d", &X[ i ] );
			Return += X[ i ] * 100;
		}
		Return *= percent;
		if ( X[ M - 1 ] ) {
			Return /= X[ M - 1 ];
		}
		else {
			Return = 0;
		}
		ans = Return;
		printf( "%d\n", ans );
	}
	return 0;
}

C++: #include <cstdio>
#include <algorithm>

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

using namespace std;

int n, m, p;
int x[100];

int main(){
	while(scanf("%d%d%d", &n, &m, &p), n){
		--m;
		rep(i, n){
			scanf("%d", &x[i]);
		}
		if(!x[m]){
			puts("0");
			continue;
		}
		int s = 0;
		rep(i, n){
			s += x[i];
		}
		printf("%d\n", s * (100 - p) / x[m]);
	}
	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) {
        int a, sum=0, win;
        rep(i,n) {
            cin >> a;
            if(i+1==m) win = a;
            sum += a*100;
        }
        sum *= 100-p;
        sum /= 100;
        if(win==0) cout << '0' << endl;
        else cout << sum/win << endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace	std;
int main(){
  int n,m,p;
  while(cin >> n >> m >> p && n){
    int	x[100];
    int a=0,d,ans;//all,dividend,answer;                                        
    for(int i=0;i<n;i++){
      cin >> x[i];
      a+=x[i];
    }   
    d=a*100*(100-p)/100;
    if(x[m-1]==0)
      ans = 0;
    else
      ans=d/x[m-1];
    cout << ans << endl;
  }
}

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

using namespace std;

typedef long long ll;
typedef unsigned long long ull;
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 = 1e16;
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

ll mod_add(ll a, ll b) { return (a + b) % MOD; }
ll mod_sub(ll a, ll b) { return (a - b + MOD) % MOD; }
ll mod_mul(ll a, ll b) { return a*b % MOD; }

ll n,m,p;

int main(){
    while(cin >> n >> m >> p && n){
        ll sum = 0;
        vector<ll> mo(n);
        rep(i,n){
            cin >> mo[i];
            sum += mo[i];
        }
        sum *= 100;
        ll num = sum * p;
        num /= 100;
        sum -= num;
        if(mo[m-1] == 0)cout << 0 << endl;
        else cout << sum / mo[m-1] << endl;
    }
}

C++: #include <iostream>

using namespace std;
 
int main(){
    int N,M,P;
 
    while(true){
	cin >> N >> M >> P;
	if(!N && !M && !P) break;
	int nm[101],sum = 0;
	for(int i = 0 ; i < N ; i++){
	    cin >> nm[i];
	    sum += nm[i];
	}
	if(!nm[M-1]){
	    cout << '0' << endl;
	    continue;
	}
	int money = sum*(100-P)/nm[M-1];
	cout << money << endl;
    }
    return 0;
}

C++: #include <iostream>

using namespace std;


int n,m,p;
int mem[101];
void solve(){

}
int main(){
  while(cin >> n >> m >> p, n || m || p){
    fill(mem, mem+101, 0);
    int sum = 0;
    for(int i = 0; i < n ; i++){
      cin >> mem[i];
      sum += mem[i];
    }
    sum *= 100;
    if(!mem[m-1])cout << 0 << endl;
    else {
      sum *= (100.-p)/100.;
      cout << sum / mem[m-1] << endl;
    }
  }
  return 0;
}

C++: #include<cstdio>
using namespace std;
int main(){
    int n,m,p;
    while(scanf("%d%d%d",&n,&m,&p),n||m||p){
        int sum=0,c;
        for(int i=1;i<=n;i++){
            int val;
            scanf("%d",&val);
            sum+=val;
            if(i==m)c=val;
        }
        if(c==0){
            puts("0");
            continue;
        }
        double ans=100.0*sum/c*(100-p)/100;
        printf("%d\n",(int)ans);
    }
    return 0;
}