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;

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

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

int n,m,p,sum;
int x[105];

int main(){
  int i;
  while(1){
    cin >> n >> m >> p;
    if(n+m+p==0)break;
    sum=0;
    for(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;
  }
  return 0;
}

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

C++: #include<iostream>
#include<string>
#include<algorithm>
#include<map>
#include<set>
#include<utility>
#include<vector>
#include<cmath>
#include<cstdio>
#define loop(i,a,b) for(int i=a;i<b;i++) 
#define rep(i,a) loop(i,0,a)
#define pb push_back
#define mp make_pair
#define it ::iterator
#define all(in) in.begin(),in.end()
const double PI=acos(-1);
const double ESP=1e-10;
using namespace std;
int main(){
  int n,a,b;
  while(cin>>n>>a>>b,a||n||b){
    vector<int>in(n);
    rep(i,n)cin>>in[i];
    double sum=0;
    rep(i,n)sum+=in[i];
    sum*=100;
    sum*=(100-b)/100.0;
    if(in[a-1]==0)cout<<0<<endl;
    else cout<<(int)(sum/in[a-1])<<endl;
  }

}

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

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

int main(){
	int n,m,p;
	while(cin >>n >>m >>p,n!=0){
		int tmp, set;
		int sum=0;
		rep(i,n){
			cin >> tmp;
			sum+=tmp;
			if(i==m-1) set = tmp;
		}
		if(set == 0){
			cout << 0 << endl;
		}else{
			sum = (sum * 100 - (sum * p));
			cout << (sum/set) << endl;
		}
	}
}

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

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();}
template<class T> inline T sqr(T x) {return x*x;}

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 pb push_back
#define mp make_pair
#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 range(i,a,b) for(int i=(a);i<(b);++i)
#define rep(i,n)  range(i,0,n)
#define clr(a,b) memset((a), (b) ,sizeof(a))
#define dump(x)  cerr << #x << " = " << (x) << endl;
#define debug(x) cerr << #x << " = " << (x) << " (L" << __LINE__ << ")" << " " << __FILE__ << endl;

const double eps = 1e-10;
const double pi  = acos(-1.0);
const ll INF =1LL << 62;
const int inf =1 << 29;

int main(void){
    for(int n, m, p, res; cin >> n >> m >> p, n; cout << res << endl){
        res = 0;
        m--;

        int sum = 0, num;
        rep(i, n){
            int x; cin >> x;

            sum += x;
            if(i == m) num = x;
        }

        if(num) res = sum * (100 - p) / num;
    }

	return 0;
}

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i = 1 ; i <= n ; i++)

int main(){
  while(true){
    int n, m, p;
    cin >> n >> m >> p;
    if(n == 0 && m == 0 && p == 0)break;
    int x[1000];
    x[0] = -1;
    int gol = 0, h = 0;
    rep(i, n){
      cin >> x[i];
      h += x[i];
      gol += 100 * x[i];
    }
    gol = gol - gol*p/100;
    int ans = 0;
    rep(i, h){
      if(i == m){
	ans = gol/x[i];
      }
    }
    cout << ans << '\n';
  }
}

C++: #include <iostream>
using namespace std;
#define rep(i,n) for(int i = 1 ; i <= n ; i++)

int main(){
  while(true){
    int n, m, p;
    cin >> n >> m >> p;
    if(n == 0 && m == 0 && p == 0)break;
    int x;
    int hito = 0, sum = 0;
    
    
    rep(i, n){
      cin >> x;
      sum += x;
      if(i == m){
	hito = x;
      }
      if(hito == 0){
	cout << 0 << '\n';
      }else{
	cout << hito*(100-p)/x << '\n';
      }
    }
  }
}

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

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

int main(){

  int n, m, p, x[1001];
  
  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 {
    int ans = sum * (100-p) / win;
    cout << ans << endl;
    }
    sum=0;
  }

  return 0;
}

C++: #include <bits/stdc++.h>
#define _overload(_1,_2,_3,name,...) name
#define _rep(i,n) _range(i,0,n)
#define _range(i,a,b) for(int i=(int)(a);i<(int)(b);++i)
#define rep(...) _overload(__VA_ARGS__,_range,_rep,)(__VA_ARGS__)
#define _all(arg) begin(arg),end(arg)

template<class T>bool chmax(T &a, const T &b) { return (a<b)?(a=b,1):0; }
template<class T>bool chmin(T &a, const T &b) { return (b<a)?(a=b,1):0; }

using namespace std;

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

C++: #include<iostream>
using namespace std;
int main(){
	int a,b,c,i,d,e,sum;
	while(1){
		sum=0;
	cin>>a>>b>>c;
	if(a==0&&a==b&&c==0)break;
for(i=0;i<a;i++){
cin>>d;
sum+=d;
if(i==b-1)e=d;
}
if(b==0)cout<<e;
if(c==100)cout<<0;
else if(c==0)cout<<sum*100/e;
else cout<<(sum*100-sum*c)/e;
cout<<'\n';
}
return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<math.h>
#include<queue>
#include<vector>
#include<climits>
#include<map>
#include<string>
#include<functional>
#include<iomanip>
#include<deque>

using namespace std;
typedef long long ll;

vector<ll> ans;

int main() {
	while (1) {
		ll N, M, P, X, winNum = 0, sum = 0;
		cin >> N >> M >> P;
		if (N == 0 && M == 0 && P == 0)break;
		for (int i = 1; i <= N; i++) {
			cin >> X;
			sum += X;
			if (i == M)winNum = X;
		}
		if (winNum == 0) {
			ans.push_back(0);
		}
		else {
			ans.push_back(sum * (100 - P) / winNum);
		}
	}
	for (int i = 0; i < ans.size(); i++)cout << ans[i] << endl;
	return 0;
}