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;

typedef long long ll;
typedef pair<int,int> pii;
typedef vector<int> VI;
typedef vector<VI> VVI;
const double PI = 3.14159265358979323846;
const double EPS = 1e-12;
const int INF = numeric_limits<int>::max() / 2;
const int NEG_INF = numeric_limits<int>::min() / 2;

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

  int n,m,p;
  int player[101];
  while(true){
    int ans;
    cin >> n >> m >> p;
    if(n==0) break;
    int voter=0;
    for(int i=1;i<=n;i++){
      int x;
      cin >> x;
      player[i] = x;
      voter += x;
    }
    if(player[m]==0) ans=0;
    else ans = voter*p/player[m];
    cout << ans  << endl;
  }
}

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

C++: #include <bits/stdc++.h>
using namespace std;
int main() {
	int n,m,p;
	while(cin>>n>>m>>p,n){
		int sum=0,num[100]={};
		for(int i=0;i<n;i++){
			cin>>num[i];
			sum+=num[i]*100;
		}
		sum*=(double)(100-p)/100;
		if(num[m-1]==0)cout<<0<<endl;
		else cout<<sum/num[m-1]<<endl;
	}
}

C++: #include<bits/stdc++.h>
using namespace std;
 
#define REP(i,s,n) for(int i=s;i<n;++i)
#define rep(i,n) REP(i,0,n)
#define SORT(c) sort((c).begin(),(c).end())
#define IINF INT_MAX
#define LLINF LLONG_MAX
#define DEBUG false
 
typedef long long ll;
typedef pair<int, int> ii;


int main() {

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

	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vint;
typedef pair<int,int> pint;
typedef vector<pint> vpint;
#define rep(i,n) for(int i=0;i<(n);i++)
#define REP(i,n) for(int i=n-1;i>=(0);i--)
#define reps(i,f,n) for(int i=(f);i<(n);i++)
#define each(it,v) for(__typeof((v).begin()) it=(v).begin();it!=(v).end();it++)
#define all(v) (v).begin(),(v).end()
#define eall(v) unique(all(v), v.end())
#define pb push_back
#define mp make_pair
#define fi first
#define se second
#define chmax(a, b) a = (((a)<(b)) ? (b) : (a))
#define chmin(a, b) a = (((a)>(b)) ? (b) : (a))
const int MOD = 1e9 + 7;
const int INF = 1e9;
const ll INFF = 1e18;


int main(void) {
	while(1) {
		int N, M, P;
		int x[110];
		scanf("%d %d %d", &N, &M, &P);
		if(N == 0 && M == 0 && P == 0) break;
		reps(i, 1, N + 1) scanf("%d", &x[i]);

		ll sum = 0;
		reps(i, 1, N + 1) sum += 100 * x[i];

		ll ans;
		// printf("sum %d\n", sum);
		if(x[M] != 0) ans = (double)sum * (100 - P) / 100.0 / x[M];
		else ans = 0;
		printf("%lld\n", ans);
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <string>
#include <vector>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <algorithm>

#define CH(N,A,B) (A<=N&&N<B)
#define REP(i,a,b) for(int i=a;i<b;i++)
#define RREP(i,a,b) for(int i=(b-1);a<=i;i--)

using namespace std;

int N, M, P, X[105];

int main() {
  while(1){
      cin>>N>>M>>P;
      if(N==0 && M==0 && P==0) break;
      int sum=0;
      map<int,int> m;
      REP(i,0,N){
        cin>>X[i];
        m[i] = X[i];
        sum += X[i]*100;
      }
      if(m[M-1] != 0) cout<<sum*(100-P)/100/m[M-1]<<endl;
      else cout<<0<<endl;
  }


  return 0;
}

C++: ansli=[]

while 1:
    a=input().split()
    if a[0]=="0" and a[1]=="0" and a[2]=="0":
        break
    for i in range(len(a)):
        a[i]=int(a[i])
    x=[]
    for i in range(a[0]):
        x.append(int(input()))

    sum0=0
    for i in x:
        sum0+=i
    sum=sum0*100*((100-a[2])/100)
    hit=x[a[1]-1]
    if hit==0:
        ansli.append(0)
    else:
        ansli.append(int(sum/hit))

for i in ansli:
    print(i)

C++: #include <iostream>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cassert>
#include <climits>
#include <algorithm>
#include <string>
#include <sstream>
#include <complex>
#include <vector>
#include <list>
#include <queue>
#include <deque>
#include <stack>
#include <map>
#include <set>
#include <fstream>

using namespace std;
#define SZ(x) (int)(x).size()
#define REP(i,n) for(int i=0;i<(n);i++)
#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define REPR(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(s) (s).begin(), (s).end()
#define so(V) sort(ALL(V))
#define rev(V) reverse(ALL(V))
#define uni(v) v.erase( unique(ALL(v)) , v.end());

typedef long long unsigned int llu;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<ll> vll;
typedef vector<bool> vb;
const double EPS = 1e-9;
const int MOD = 1e9 + 7;
const int INF = (1 << 29);
const ll LINF = 1e18;
const double PI = acos(-1);

template<typename T>vector<T> make_v(size_t a) { return vector<T>(a); }
template<typename T, typename... Ts>auto make_v(size_t a, Ts... ts) { return vector<decltype(make_v<T>(ts...))>(a, make_v<T>(ts...)); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value != 0>::type
fill_v(U & u, const V... v) { u = U(v...); }
template<typename T, typename U, typename... V>
typename enable_if<is_same<T, U>::value == 0>::type
fill_v(U & u, const V... v) { for (auto& e : u) fill_v<T>(e, v...); }
template<class T> bool chmax(T& a, const T& b) { if (a < b) { a = b; return 1; } return 0; }
template<class T> bool chmin(T& a, const T& b) { if (a > b) { a = b; return 1; } return 0; }

int main() {
	cin.tie(0);
	ios::sync_with_stdio(false);
	int N, M, P;
	cin >> N >> M >> P;
	while (N != 0) {
		double dP = (double)P;
		double sum = 0;
		double hit = 0;
		REP(i, N) {
			double X;
			cin >> X;
			sum += X;
			if (i + 1 == M)hit = X;
		}
		if (abs(hit) < EPS)cout << 0 << endl;
		else cout << (int)(sum* (100.0 - P) / hit) << endl;
		cin >> N >> M >> P;
	}
	return 0;
}

C++: #include <cstdio>
#include <iostream>
#include <algorithm>
using namespace std;
int n,m,p;
int x[111];
int main(void){
  while(cin >> n >> m >> p){
    if(!n) break;
    int c = 0;
    for(int i = 0; i < n; i++){
      cin >> x[i];
      c += x[i];
    }
    c *= 100-p;
    cout << ((x[m-1])?c/x[m-1]:0) << endl;
  }
}