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"
#include "climits"
#include "list"
#include "queue"
#include "stack"
#include "set"
#include "functional"
#include "algorithm"
#include "math.h"
#include "utility"
#include "string"
#include "map"
#include "unordered_map"
#include "iomanip"
#include "random"

using namespace std;
const long long int MOD = 1000000007;

long long int power(long long int x, long long int n, long long int M) {
	long long int tmp = 1;

	if (n > 0) {
		tmp = power(x, n / 2, M);
		if (n % 2 == 0) tmp = (tmp*tmp) % M;
		else tmp = (((tmp*tmp) % M)*x) % M;
	}
	return tmp;
}

long long int N, M, K, Q, W, H, L, R;
long long int ans;

using namespace std;


int main() {
	ios::sync_with_stdio(false);
	cin >> N >> M >> K;
	while (N) {
		int num[1000];
		int sum = 0;
		for (int i = 1; i <= N; i++) {
			cin >> num[i];
			sum += num[i];
		}
		sum = sum*(100 - K);
		if (!num[M])cout << "0\n";
		else cout << sum / num[M] << endl;
		cin >> N >> M >> K;
	}
	return 0;
}

C++: #include<stdio.h>
int main(){
	int a,b,c;
	while(scanf("%d%d%d",&a,&b,&c),a+b+c){
		c=100-c;
		int win=0;
		int mon=0;
		for(int i=0;i<a;i++){
			int d;
			scanf("%d",&d);
			if(b==i+1)win=d;
			mon+=c*d;
		}
		printf("%d\n",win?mon/win: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;
  int P;

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

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

#define INF_LL (int64)1e18
#define INF (int32)1e9
#define REP(i, n) for(int i = 0;i < (n);i++)
#define FOR(i, a, b) for(int i = (a);i < (b);i++)
#define all(x) x.begin(),x.end()
#define fs first
#define sc second

using int32 = int_fast32_t;
using uint32 = uint_fast32_t;
using int64 = int_fast64_t;
using uint64 = uint_fast64_t;
using PII = pair<int32, int32>;
using PLL = pair<int64, int64>;

const double eps = 1e-6;

template<typename A, typename B>inline void chmin(A &a, B b){if(a > b) a = b;}
template<typename A, typename B>inline void chmax(A &a, B b){if(a < b) a = b;}

const int64 mod = 1e9+7;

int main(void){
	int32 n, m, p;
	while(cin >> n >> m >> p && n && m && p){
		vector<long double> x(n);
		long double sum = 0;
		REP(i, n){
			cin >> x[i];
			sum += x[i];
		}
		if(x[m-1] != 0)
			sum = (sum*100-sum*p)/x[m-1];
		else sum = 0;
		cout << floor(sum) << endl;
	}
}

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

C++: #include<iostream>

using namespace std;

int main(){

  int n, win, p;
  while(cin >> n >> win >> p){
    if(n == 0 && win == 0 && p == 0) break;
    double money = 0;
    int data[n];

    for(int i = 0; i < n; i++){
      cin >> data[i];
      money += data[i];
    }
    money *= (100-p);

    if(data[win-1] == 0){
      cout << "0" << endl;
    }else{
      cout <<  (int)money/ data[win-1]<< endl;
    }
  }

  return 0;
}

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

using namespace std;

int main(){

  int n,m,p;

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

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

}

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

int main(){

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

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

using namespace std;

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
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 SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#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);

int main(){
  cin.tie(0);
  ios_base::sync_with_stdio(false);

  while(true){
	int N, M, P; cin >> N >> M >> P;
	if(N == 0) break;
	VI xs(N);
	REP(i,N) cin >> xs[i];
	int sum = accumulate(ALL(xs), 0);
	
	cout << (xs[M-1]==0? 0: int((double)(100 - P) * sum / xs[M-1])) << endl;
  }
  
  return 0;
}

C++: #include<stdio.h>
int main(){
    int a,b,c;
    while(scanf("%d%d%d",&a,&b,&c),a+b+c){
        c=100-c;
        int win=0;
        int mon=0;
        for(int i=0;i<a;i++){
            int d;
            scanf("%d",&d);
            if(b==i+1)win=d;
            mon+=c*d;
        }
        printf("%d\n",win?mon/win:0);
    }
}

C++: #include <iostream>
using namespace std;
int main(){
	int N, M, P;
	while( 1 ){
		cin >> N >> M >> P;
		int money = 0, mn;
		if( N == 0 && M == 0 && P == 0 ) break;
		for( int i = 1; i <= N; i++ ){
			int j;
			cin >> j;
			if(M == i) mn = j;
			money += j;
		}
		if( mn == 0 ){
			cout << 0 << endl;
		}else{
			money *= (double)(100 - P) / (double)mn;
			cout << (int)money << endl;
		}
	}
}

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

int main(){
	int n, m;
	double p;
	while (1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0) break;
		int sum = 0;
		p = p / 100;
		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;
		}
		sum = (sum * 100)*(1-p);
		cout << floor(sum / winner) << endl;
	}

	return 0;
}