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++: /* vim:set foldmethod=marker: */
#include <bits/stdc++.h>
using namespace std;

//{{{
#define all(x) (x).begin(),(x).end()
#define REP(i,a,b) for(int i=(int)(a); i<(int)(b); i++)
#define RREP(i,a,b) for(int i=(int)(a); i>=b; i--)
#define rep(i,n) REP(i,0,n)
#define rrep(i,n) RREP(i,n,0)
#define pb(x) push_back(x)
#define mp(x,y) make_pair((x),(y))

typedef long long ll;
typedef unsigned long long ull;
typedef pair<int,int> pii;
typedef vector<int> vi;
typedef vector<pii> vp;

#define dump(x) (cerr << #x << "=" << x << endl)
template<class T> ostream& osContainer(ostream& os,T c) { os<<'[';for(decltype(c.begin()) it=c.begin();it!=c.end();it++)os<<*it<<',';os<<']';return os; }
template<class T> ostream& operator<<(ostream& os,const vector<T>& v) { return osContainer(os,v); }
template<class T> ostream& operator<<(ostream& os,const set<T>& s) { return osContainer(os,s); }
template<class T> ostream& operator<<(ostream& os,const multiset<T>& s) { return osContainer(os,s); }
template<class T,class S> ostream& operator<<(ostream& os,const map<T,S>& m) { return osContainer(os,m); }
template<class T,class S> ostream& operator<<(ostream& os,const multimap<T,S>& m) { return osContainer(os,m); }
template<class T1,class T2>
ostream& operator<<(ostream& os, const pair<T1,T2>& p){ os << '(' << p.first << ',' << p.second << ')'; return os; }

const int dx[] = {0,1,0,-1};
const int dy[] = {1,0,-1,0};
//}}}

void solve()
{
    int n, m, p;

    while (cin >> n >> m >> p, n || m || p)
    {
        int s = 0;
        int x[101];
        REP(i, 1, n + 1) {
            cin >> x[i];
            s += 100 * x[i];
        }

        cout << (x[m] ? s * (100 - p) / 100 / x[m] : 0) << endl;
    }
}

int main(){
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout.setf(ios::fixed);
    cout.precision(12);
    solve();
}

C++: #include<bits/stdc++.h>
using namespace std;
using ll = int64_t;
int main(){
    while(1){
        ll N, M, P;
        cin >> N >> M >> P;
        if(!N && !M && !P) break;
        M--;
        ll po[N];
        for(ll i = 0; i < N; i++) cin >> po[i];
        ll yo = 0;
        for(ll i = 0; i < N; i++) yo += po[i];
        yo *= 100;
        cout << (po[M] ? yo * (100 - P) / (100 * po[M]) : 0) << endl;
    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main()
{
	int n, m, p;
	int x[101];
	while (cin >> n >> m >> p && n != 0 && m != 0)
	{
		int sum = 0;
		for (int i = 1; i <= n; i++)
		{
			cin >> x[i];
			sum += x[i]*100;
		}
		if (x[m] == 0)
		{
			cout << 0 << endl;
			continue;
		}
		double ans  =sum - ((double)p /100.0) * sum;
		cout << (int)(ans / x[m]) << endl;

	}
	return 0;
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

using namespace std;

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();}

typedef vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

const double EPS = 1e-10;

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

	while(cin >> n >> m >> p, n, m, p) {
		vi player(n, 0);
		int sum = 0;

		REP(i, n) {
			cin >> player[i];
			sum += player[i];
		}

		sum *= (100-p);

		if(player[m-1]) {
			cout << sum/player[m-1] << endl;
		} else {
			cout << 0 << endl;
		}
	}


}

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

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

#define vi vector<int>
#define pb push_back
#define mp make_pair

typedef long long ll;

int main() {
//    ifstream in("a_in.txt");
//    cin.rdbuf(in.rdbuf());

    int n,m,pp;
    while(cin >>n >> m>>pp,n){
        int p = pp;
        int a[110] = {};
        p = 100-p;
//        int m[110] = {};
        rep(i,n) cin >> a[i];
        int sum = 0;
        rep(i,n) sum += a[i];
        m--;
//        cout << p << " : " << sum*100 << " : " << a[m] << endl;
        if(a[m] ==0) cout << 0 << endl;
        else cout << int(p*sum/a[m])  << endl;

    }
    return 0;
}

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

int main(){

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

  return 0;
}

C++: #include <iostream>

int main() {

    for (;;) {

        int n;
        int m;
        int p;

        std::cin >> n;
        std::cin >> m;
        std::cin >> p;

        if (n == 0 && m == 0 && p == 0) {
            break;
        }

        int numberOfTickets = 0;
        int numberOfTicketsForWinner = 0;

        for (int i=1; i<=n; ++i) {

            int t;
            std::cin >> t;

            numberOfTickets += t;

            if (i == m) {
                numberOfTicketsForWinner = t;
            }
        }

        if (numberOfTicketsForWinner == 0) {
            std::cout << 0 << std::endl;
            continue;
        }

        const int pooled = 100 * numberOfTickets;
        const double haitou = (double) (100 - p) * pooled / 100;
        const int haitouPerTicket = haitou / numberOfTicketsForWinner;

        std::cout << haitouPerTicket << std::endl;

    }

}

C++: #include<iostream>

using namespace std;

int main(){

  int n,m,p,sum=0,k;

  while(cin>>n>>m>>p){

    if(n==0&&m==0&&p==0){
      break;
    }

      int x[n];
      for(int i=0;i<n;i++){
	cin>>x[i];
      }

      if(x[m-1]==0){
	cout<<0<<endl;
      }else{

	for(int t=0;t<n;t++){

	    sum=sum+x[t];

	}

	k=100*(sum-sum*p/100);
      

    
      cout<<k/x[m-1]<<endl;
      }

      sum=0;
    
    }

  cout<<endl;

  return 0;
}