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;
using i64 = int_fast64_t;
#define rep(i, N) for(int (i) = 0; (i) < (N); (i)++)
#define all(v) (v).begin(), (v).end()
#define eb emplace_back

int main(){
    int N, M, P;
    while(cin >> N >> M >> P, N != 0){
        vector<int> vote(N);
        int sum = 0;
        rep(i, N) {
            cin >> vote[i];
            sum += vote[i];
        }
        sum = (100 - P) * sum;
        if(vote[M-1] == 0) cout << 0 << endl;
        else cout << sum / vote[M-1] << endl;
    }
}

C++: #include <bits/stdc++.h>
#define REP(i,n) for (int i=0;i<(n);i++)
#define ALL(a) (a).begin(),(a).end()
#define RFOR(i,a,b) for (int i=(b)-1;i>=(a);i--)
#define REP(i,n) for (int i=0;i<(n);i++)
#define RREP(i,n) for (int i=(n)-1;i>=0;i--)
#define ll long long
#define ull unsigned long long
int dx[4] = {1, 0, -1, 0};
int dy[4] = {0, 1, 0, -1};

using namespace std;

int nextInt(){int a;cin>>a;return a;}

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

C++: #include <iostream>
#include <vector>
#include <set>
#include <unordered_set>
#include <map>
#include <unordered_map>
#include <algorithm>

using namespace std;
using vi = vector<int>;
using vvi = vector<vi>;
template<class T> using hset = unordered_set<T>;
template<class Key, class T> using hmap = unordered_map<Key, T>;

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

int main() {
    int n, m, p, sum, win, tmp;
    while (cin >> n >> m >> p) {
        if (n == 0) break;
        sum = 0;
        for (int i = 1; i <= n; i++) {
            cin >> tmp;
            sum += tmp;
            if (i == m) win = tmp;
        }

        if (win == 0) cout << 0 << endl;
        else cout << (100*sum)*(100-p)/(win*100) << endl;
    }

    return 0;
}

C++: #include <bits/stdc++.h>
#define INF 1e18
#define int long long
#define Rep(i, a, n) for (int i = (a); i < (n); i++)
#define Repr(i, n, a) for (int i = (n); i >= (a); i--)
#define rep(i, n) Rep(i, 0, n)
#define repr(i, n) Repr(i, n, 0)
#define all(a) a.begin(), a.end()
using namespace std;
typedef pair<int, int> P;
const int mod = 1000000007;

signed main()
{
    ios::sync_with_stdio(false);
    cin.tie(0);

    int n, m, p;
    while (1)
    {
        cin >> n >> m >> p;
        m--;
        if (n == 0)
            break;
        int sum = 0, num;
        rep(i, n)
        {
            int a;
            cin >> a;
            sum += a;
            if (i == m)
                num = a;
        }
        sum *= (100 - p);
        cout << (num != 0 ? sum / num : 0) << endl;
    }
}

C++: #include<cstdio>

using namespace std;

int main(){
	for(int n,m,p;scanf("%d%d%d",&n,&m,&p),n;){
		int x[100],sum=0;
		for(int i=0;i<n;i++)	scanf("%d",x+i),sum+=x[i];
		int ans;
		if(x[m-1]==0)	ans=0;
		else	ans=(int)(100*sum*(1-p/100.)/x[m-1]);
		printf("%d\n",ans);
	}
	return 0;
}

C++: #include <stdio.h>
 
int main() {
 
  int n,m,p;
  int b,c;
  int i,j,k;
  int sum;
 
  while (1) {
    b = 0;
    sum = 0;
    int a[101] = {0};
    double p;
    c = 0;
    
 
    scanf("%d %d %lf",&n,&m,&p);
 
    if(n == 0 && m ==0 && p ==0)break;
 
    for(i = 0; i<n; i++) {
      scanf("%d", &a[i]);
      b = b + a[i];
    }
 
    b = b * 100;
    p = p / 100;
    //printf("p = %f",p);
 
    if(a[m-1] == 0) {
      c = 0;
    } else {
      p = b - b*p;
      c = p / a[m-1];
    }
 
    printf("%d\n",c);
     
 
  }
 
  return 0;
}

C++: #include <functional>
#include <algorithm>
#include <iostream>
#include <numeric>
#include <iomanip>
#include <utility>
#include <cstdlib>
#include <sstream>
#include <bitset>
#include <vector>
#include <cstdio>
#include <ctime>
#include <queue>
#include <deque>
#include <cmath>
#include <stack>
#include <list>
#include <map>
#include <set>

using namespace std;

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

#define dump(x)  cerr << #x << " = " << (x) << endl
#define rep(i,n) for(int i=0;i<(n);i++)
#define all(a)  (a).begin(),(a).end()
#define pb push_back


int main() {
   
    int n,m,p;
    while(cin>>n>>m>>p){
        if(n==0 && m==0 && p==0)break;
       
        int sum=0;
        int num[200]={};
        rep(i,n){
            cin>>num[i];
            sum+=num[i];
        }
        int money;
       
       
        if(num[m-1]!=0){
            money=sum*(100-p)/num[m-1];
            cout<<money<<endl;
        }
        else
            cout<<"0"<<endl;
       
    }
   
    return 0;
}

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

typedef long long LL;

//container util
//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define DECIM8  fixed<<setprecision(8) 
#define SZ(a) int((a).size())
#define SORT(c) sort((c).begin(),(c).end())

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

//constant
//--------------------------------------------
const double EPS = 1e-10;
const double PI  = acos(-1.0);

//clear memory
#define CLR(a) memset((a), 0 ,sizeof(a))

using namespace std;
int main(void)
{
  for(;;){
    int n,m,p,sum=0,div;
    cin >> n >> m >> p;
    if(!n&&!m&&!p) return 0;
    REP(i,n){
      int tmp;
      cin >> tmp;
      sum+=tmp;
      if(i+1==m) div=tmp;
    }
    if(div==0) sum=0;
    else sum=sum*(100-p)/div;
    cout << sum << endl;
  }
}

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

int main(){
	int n, m, p;
	while (1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0) break;
		int sum = 0;
		int winner;
		for (int i = 1; i <= n; i++){
			int c;
			cin >> c;
			if (i == m){
				winner = c;
			}
			sum += c;
		}

		if (winner == 0){
			cout << 0 << endl;
			continue;
		}
		int ans = floor((sum * 100 * (100 - p) / 100) / winner);
		cout << ans << endl;
	}

	return 0;
}