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){
    if(n==0)break;
    double G=0;
    int num[n];
    for(int i=0;i<n;i++){
      cin>>num[i];
      G+=100*num[i];
    }
    G*=(100.0-p)/100.0;
    if(num[m-1]!=0){
      cout << (int)G/num[m-1] << endl;
    }else{
      cout << 0 << endl;
    }
  }
  return 0;
}

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() {

    int n,m,pp;
    while(cin >>n >> m>>pp,n){
        double p = pp;
        int a[110] = {};
        p/=100;
        p = 1-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*100/a[m])  << endl;

    }
    return 0;
}

C++: #include <iostream>
#include <fstream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <cstring>
#include <string>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>
using namespace std;
 
#define REP(i,n) for(int i=0; i<n; ++i)
#define FOR(i,a,b) for(int i=a; i<=b; ++i)
#define FORR(i,a,b) for (int i=a; i>=b; --i)
#define pi M_PI
 
typedef long long ll;
typedef vector<int> VI;
typedef vector<ll> VL;
typedef vector<VI> VVI;
typedef pair<int,int> P;
typedef pair<ll,ll> PL;

int main() {
    int n, m, p;
    while (cin >> n >> m >> p && n){
        m--;
        int s = 0, x;
        REP(i,n){
            int a;
            cin >> a;
            s += a;
            if (i == m) x = a;
        }
        int ans = (x == 0 ? 0 : s * (100-p) / x);
        cout << ans << endl;
    }

    return 0;
}

C++: #include <cstdio>

int main() {
  int N, M, P;
  while (true) {
    scanf("%d %d %d", &N, &M, &P);
    if (N == 0 && M == 0 && P == 0) break;
    int sum = 0, won_X = 0;
    for (int i=1;i<=N;i++) {
      int X;
      scanf("%d", &X);
      sum += X;
      if (i == M) won_X = X;
    }
    printf("%d\n", (won_X > 0 ? (sum*(100-P)/won_X) : 0));
  }
  return 0;
}

C++: #define _crt_secure_no_warnings

#ifndef _GLIBCXX_NO_ASSERT
#include <cassert>
#endif
#include <cctype>
#include <cerrno>
#include <cfloat>
#include <ciso646>
#include <climits>
#include <clocale>
#include <cmath>
#include <csetjmp>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <ccomplex>
#include <cfenv>
#include <cinttypes>
#include <cstdbool>
#include <cstdint>
#include <ctgmath>
#include <cwchar>
#include <cwctype>
#endif


#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>

#ifdef __GXX_EXPERIMENTAL_CXX0X__
#include <array>
#include <atomic>
#include <chrono>
#include <condition_variable>
#include <forward_list>
#include <future>
#include <initializer_list>
#include <mutex>
#include <random>
#include <ratio>
#include <regex>
#include <system_error>
#include <thread>
#include <tuple>
#include <typeindex>
#include <type_traits>
#include <unordered_map>
#include <unordered_set>
#endif

using namespace std;

int main()
{
	int a, b, c,sum;
	vector<int> data;
	while (1)
	{
		data.clear();
		cin >> a >> b >> c;
		if (a == 0)break;
		data.resize(a);
		for (size_t i = 0; i < a; i++)
		{
			cin >> data[i];
		}
		sum=accumulate(data.begin(), data.end(), 0);
		cout << (data[b - 1]?(int)(sum*(100-c) / (double)data[b - 1]):0) << endl;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<list>
#include<string>
#include<algorithm>
#include<map>
#include<cmath>
using namespace std;
int main() {
	long long n, m, p;
	while (cin >> n >> m >> p&&n != 0 && m != 0 && p != 0) {
		double sum = 0;
		double  x = 0, t = 0;
		for (int i = 1; i <= n; i++) {
			cin >> x;
			sum += (x * 100);
			if (i == m) t = x;
		}
		double a = (100-(double)p) / 100;
		sum *= a;
		if (t == 0) cout << 0 << endl;
		else cout << floor(sum / t) << endl;
	}
}

C++: #include<iostream>
using namespace std;
int N,M,P;
int X[100],sum;
int main(){
  while(cin>>N>>M>>P&&N){
    sum=0;
    for(int i=0;i<N;i++)cin>>X[i],sum+=X[i];
    sum*=(100-P);
    if(X[M-1])cout<<sum/X[M-1]<<endl;
    else cout<<0<<endl;
  }
  return 0;
}

C++: #include <iostream>
#include <stdio.h>
#include <algorithm>
#include <math.h>
#include <vector>
#include <string>
#include <sstream>
#include <numeric>
#include <set>
#include <map>
//#include <bits/stdc++.h>

#define rep(i, j) for(int i = 0; i < j; i++)
#define all(i) i.begin(), i.end()
#define ll long long
#define bl bool
#define nn printf("\n");
#define mod 1000000007

using namespace std;

int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	
	int N, M, P;
	while(cin >> N >> M >> P && N != 0 && M != 0)
	{
		vector<int> dat(N, 0);
		rep(i, N){ cin >> dat[i]; }
		if(dat[M - 1] == 0){ printf("0\n"); }
		else{ printf("%d\n", (accumulate(all(dat), 0) * (100 - P)) / dat[M - 1]); }
	}
	
	return 0;
}

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

int main() {
    int N, M, P;
    while (cin >> N >> M >> P && (N || M || P)) {
        vector<int> X(N);
        for (int i=0; i<N; ++i) {
            cin >> X[i];
        }
        if (X[M-1] == 0) {
            cout << 0 << endl;
        } else {
            int ret = accumulate(X.begin(), X.end(), 0) * 100 * (1.0 - P / 100.0) / X[M-1];
            cout << ret << endl;
        }
    }
    return 0;
}

C++: #if 1
  #include <bits/stdc++.h>
#else
  #include "../../bits/stdc++.h"
#endif

#define FOR(i,a,b) for(int i = (a);i < (b);i++)
#define RFOR(i,a,b) for(int i = (b)-1;i >= (a);i--)
#define REP(i,n) FOR(i,0,(n))
#define RREP(i,n) RFOR(i,0,(n))

using namespace std;

//typedef pair<int, int> P;
#define pb push_back
#define mp make_pair
#define ft first
#define sd second

int N, M, P;
int x[102];

bool input(){
  cin>>N>>M>>P;
  REP(i, N)cin>>x[i];
  return N|M|P;
}

void solve(){
  int s=0;
  REP(i, N)s+=x[i];
  int res=s*(100-P);
  if(x[M-1]==0) {
    cout<<0<<endl;
    return ;
  }
  res /= x[M-1];
  cout<<res<<endl;
}

int main(){
  cin.tie(0);
  
  while (input()){
      solve();
  }
  
  return 0;
}

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

int main() {
  while (1) {
    int n;
    int m;
    int p;
    int sum = 0;
    int k;

    scanf("%d%d%d", &n, &m, &p);
    if (n == 0 && m == 0 && p == 0) return 0;

    for (int i=0; i<n; i++) {
      int x;

      scanf("%d", &x);
      if (i == m-1) k = x;
      sum += x;
    }

    if (k == 0) puts("0");
    else printf("%d\n", sum*(100-p)/k);
  }
}