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,x[100],total;
  while(1){
    cin>>n>>m>>p;

    if(!(n||m||p))break;

    total=0;
    for(int i=0; i<n; i++) cin>>x[i],total+=x[i];

    if(x[m-1]!=0) total = total*(100-p)/x[m-1] ;
    else total = 0;
    cout<< total <<endl;
  }
}

C++: #include <iostream>
#include <algorithm>

using namespace std;

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

C++: #include <iostream>
#include <cstdio>
#include <iomanip>

#include <vector>
#include <map>
#include <set>
#include <queue>
#include <bitset>
#include <stack>
#include <utility>

#include <numeric>
#include <algorithm>
#include <functional>

#include <cctype>

#include <complex>
#include <string>
#include <sstream>

using namespace std;

#define all(c) c.begin(),c.end()
#define rall(c) c.rbegin(),c.rend()
#define rep(i,n) for(unsigned int i=0;i<(n);i++)
#define tr(it,container) for(typeof(container.begin()) it = container.begin(); \
                                                  it != container.end(); ++it)

typedef long long ll;
typedef complex<double> P;
const int dx[] = {1,0,-1,0};
const int dy[] = {0,-1,0,1};
const double EPS = 1e-9;
const int days[] = {31,28,31,30,31,30,31,31,30,31,30,31};
const int daysleap[] = {31,29,31,30,31,30,31,31,30,31,30,31};

int main(){
    while(true){
        int N,M,P;
        cin >> N >> M >> P;
        if(N==0) break;
        vector<int> X(N);
        rep(i,N) cin >> X[i];
        int total = accumulate(all(X),0);
        int rest = total * (100-P);

        int ret;
        if(X[M-1] == 0) ret = 0;
        else ret = rest / X[M-1];
        if(X[M-1] == 0) ret = 0;
        cout << ret << endl;
    }
    return 0;
}

C++: #include <iostream>
using namespace std;
int main(){
  int n,m,p;

  while( cin>>n>>m>>p && n|m|p ){
    m--;
    int x,y=0, z=0;
    for( int i=0;i<n;i++ ){
      cin >> x;
      y+=x;
      if( i==m ) z=x;
    }
    if( z==0 )
      x=0;
    else{
      y = y*(100-p);// / 100;
      x = y/z;// * 100;
    }
    cout << x << endl;
  }

  return 0;
}

C++: #include<iostream>
#include<cmath>
using namespace std;
int main(){
	while(true){
		int gold = 0;
		int n,m,p,mn;
		scanf("%d%d%d", &n, &m, &p);
		if( n == 0 && m == 0 && p == 0 )break;
		for(int i = 0; i < n; ++i){
			int t;scanf("%d", &t);gold += 100 * t;
			if(i==m-1)mn=t;
		}
		gold = (int)floor(gold * (1 - ((double)p/100)));
		printf("%d\n", mn > 0 ? (int)floor((double)gold / mn) : 0);
	}
	return 0;
}

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

int main(void){
	int N, M, P;
	while(scanf("%d %d %d", &N, &M, &P) != EOF && (N != 0 && M != 0 && P != 0)){
		int sum = 0;
		int *X = new int[N];
		for(int i = 0; i < N; i++){
			scanf("%d", X+i);
			sum += X[i];
		}
		if(X[M] == 0){
			printf("%d\n", 0);
		}else{
			printf("%d\n", (int)((sum * (100 - P)) / X[M-1]));
		}
	}
  return 0;
}

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

C++: #include<bits/stdc++.h>
#define _ ios_base::sync_with_stdio(0);cin.tie(0);
#define REP(i,n) for(int i=0;i<(int)(n);i++)

using namespace std;

int num[101];

int main(){ _;
  int n,m,p;
  while(cin>>n>>m>>p,!(n==0&&m==0&&p==0)){
    int sum=0;
    REP(i,n){
      cin>>num[i];
      sum+=num[i];
    }
    m--;
    cout<<(num[m]==0?0:(100-p)*sum/num[m])<<endl;
  }
}

C++: #ifndef _WIN32
#include<iostream>
#endif // !_WIN32

#include<cmath>
#include<iomanip>
#include<algorithm>
#include<vector>
#include<queue>
#include<stack>
#include<map>
#include<set>
#include<functional>

using namespace std;
#define FOR(i,bg,ed) for(int i=(bg);i<(ed);i++)
#define REP(i,n) FOR(i,0,n)

template<typename T>
bool chmin(T& l, T r) {
	bool res = l > r;
	if (res)l = r;
	return res;
}
template<typename T>
istream& operator>>(istream& is, vector<T> &v) {
	for (auto &it : v)is >> it;
	return is;
}
typedef vector<int> V;
int f(int x, int y, int z) {
	return x + y + z;
}
int main() {
	int N, M, P;
	while (cin >> N>>M>>P, N+M+P) {
		V x(N);
		cin >> x;
		int X = 0;
		REP(i, N)X += x[i];
		int Y = X*(100 - P);
		if (x[M - 1] == 0)cout << 0 << endl;
		else cout << Y / x[M - 1]<<endl;
	}
	return 0;
}

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

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

C++: #include <cstdio>
#include <iostream>
#include <cstdlib>

using namespace std;

int func(int y, int m, int d);

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

C++: #include <iostream>
#include <cstdio>

using namespace std;

int main()
{
  int n_player, winner;
  double P;
  while (scanf(" %d %d %lf", &n_player, &winner, &P) == 3) {
    if (n_player == 0 && winner == 0 && P == 0) break;
    winner--;
    //cout << "winner = " << winner << endl;
    int table[n_player];
    double money = 0;
    for (int i = 0; i < n_player; i++) {
      scanf(" %d", &table[i]);
      money += table[i] * 100;
    }
    if (table[winner] == 0) {
      cout << 0 << endl;
      continue;
    }
    //cout << "money = " << money << endl;
    money -= money * (double)(P/100);
    //cout << (double)(P/100) << endl;
    //cout << "money2 = "  << money << endl;
    cout << (int)(money / table[winner]) << endl;
  }
  return 0;
}

C++: #include <iostream>

using namespace std;

int main()
{
  int N,M,P;

  while(1){
    int max=0;
    cin>>N>>M>>P;
    
    if(N==0)
      break;

    int X[]={0};

    for(int i=0;i<N;i++){
      cin>>X[i];
      max+=X[i];
    }

    max=max*(100-P);

    if(X[M-1]==0)
      cout<<0<<endl;
    else
      cout<<max/X[M-1]<<endl;
  }

  return 0;
}

C++: #include<cstdio>
#include<cstdlib>
#include<cstring>
#include<cmath>
#include<iostream>
#include<string>
#include<vector>
#include<map>
#include<set>
#include<list>
#include<queue>
#include<deque>
#include<algorithm>
#include<numeric>
#include<utility>
#include<complex>
#include<functional>
 
using namespace std;

/* constant */

const int MAX_N = 100;

/* typedef */

/* global variables */

int n, m, p;
int xis[MAX_N];

/* subroutines */

/* main */

int main() {
  for (;;) {
    cin >> n >> m >> p;
    if (n == 0) break;
    m--;

    int sum = 0;
    for (int i = 0; i < n; i++) {
      cin >> xis[i];
      sum += xis[i];
    }

    int d = (xis[m] == 0) ? 0 : (double)(sum * (100 - p)) / xis[m];
    cout << d << endl;
  }
  
  return 0;
}