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 <algorithm>
#include <vector>

using namespace std;

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

  return 0;
}

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

using namespace std;

int main()
{
  while(1){
    int N,M;
    double P;
    cin>>N;
    cin>>M;
    cin>>P;

    if(N == 0 && M == 0 && P == 0){
      break;
    }

    int sum_person = 0;
    vector<int> n;
    for(int i = 0;i < N;++i){
      int j = 0;
      cin>>j;
      n.push_back(j);
      sum_person += j;
    }

    double sum = 100 * sum_person;
    int getter = n.at(M-1);
    double get = sum * ((100-P) / 100);

    int ans = 0;
    if(getter != 0){
      ans = get / getter;
    }
  
    cout<<ans<<endl;
  }

  return 0;
}

C++: #include<iostream>
#include<vector>
using namespace std;
int main(){
  int n,m,p;
  while(cin >>n>>m>>p,n||m||p){
    int all = 0;
    vector<int> card;
    for(int i=0,a; i<n; i++){
      cin >>a;
      all+=a;
      card.push_back(a);
    }
    all = all*(100-p);
    if(card[m-1] == 0) cout <<"0"<<endl;
    else cout <<all/card[m-1]<<endl;
  }
  return 0;
}

C++: #include<iostream>

using namespace std;

int main(){
  int N,M,X[1000],kazu=0,kane=0,P;
  while(1){
      cin>>N;
      cin>>M;
      cin>>P;
      if(N==0 && M==0 && P==0){
        break;
      }
      for(int lop=0;lop<N;lop++){
          cin>>X[lop];
          kazu+=X[lop];
      }
      if(X[M-1]==0){
        kane=0;
      }else{
        kane=kazu*100;
        kane*=(1.0-P*0.01);
        kane=(double)(kane/X[M-1]);
      }
      cout<<kane<<endl;
      kane=0;
      kazu=0;
      for(int lop=0;lop<N;lop++){
          X[lop]=0;
      }
  }

  return 0;
}

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

int main()
{
  int N, M, P;
  while(1){
    if(N == 0 && M == 0 && P == 0){
      break;
    }else{
      int x, y, sum;
      sum = 0, y = 0;
      REP(i, N){
        cin >> x;
        sum += x;
        if(x == M)
          y = x;
      }
      if(y)
        cout << sum * 10 / y << endl;
      else
        cout << "0" << endl;
    }
  }
}

C++: #include<iostream>
using namespace std;
int main() {
	int n, m, p;
	while (cin >> n >> m >> p, n, m, p) {
		int sum = 0;
		int key;
		for (int i = 1; i <= n; i++) {
			int k; cin >> k;
			sum += k;
			if (i == m)key = k;
		}
		if (key == 0)cout << "0\n";
		else cout << sum  * (100 - p)  / key << endl;
	}
}

C++: #include <iostream>
#include <cstdio>
#include <vector>
#include <algorithm>
#include <complex>
#include <cstring>
#include <cstdlib>
#include <string>
#include <cmath>
#include <queue>
using namespace std;

#define REP(i,n) for(int i=0;i<(int)n;++i)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)
#define ALL(c) (c).begin(), (c).end()
const int INF = 1<<29;

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

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

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

  while (cin >> N >> M >> P, N != 0) {
    int num = 0;
    int sum = 0;
    for (int i = 0; i < N; i++) {
      int X;
      cin >> X;

      if (i == M - 1) {
        num = X;
      }

      sum += X;
    }

    cout << (num != 0 ? sum * (100 - P) / num : 0) << endl;
  }

  return 0;
}

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

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

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

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

using namespace std;

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

	while (cin >> N >> M >> P && N && M && P) {
		vector<int> X(N);
		int sum = 0;
		for (int i = 0; i < N; i++) {
			cin >> X[i];
			sum += X[i];
		}

		if (!X[M-1]) {
			cout << 0 << endl;
		} else {
			cout << (int)((100-P)*sum/X[M-1]) << endl;
		}
	}

	return 0;
}

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

C++: #include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for (int (i)=(0);(i)<(int)(n);++(i))
using ll = long long;

int main() {

    int n, m, p;
    while (cin >> n >> m >> p and n and m and p) {

        int sum=0, hit=0;
        rep(i, n) { int t; cin >> t; sum += 100*t; if (i == m-1) hit += t; }
        if (hit == 0) cout << 0 << endl;
        else cout << (int)(sum * (100.0 - p) / 100.0 / hit) << endl;

    }

    return 0;

}

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

using namespace std;

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

	int n, m, p;
	int j = 0;
	vector<int>ans(101);

	while(1){
		cin >> n >> m >> p;
		if (n == 0 && m == 0 && p == 0)
			break;
		long long sum = 0;

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

		if (x[m - 1] != 0) {
			ans[j] = (sum * 100 / x[m - 1])*(100-p)/100;
		}
		else {
			ans[j] = 0;
		}
		j++;

	} 

	for (int i = 0;i < j;i++) {
		cout << ans[i] << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <string>
#include <stack>
#include <queue>
#include <cmath>
#include <cstdio>
using namespace std;

int main(void) {
	int athNum, winUser, exRate;
	while (cin >> athNum >> winUser >> exRate, athNum) {
		int winBet;
		int betSum = 0;
		for (int i = 1; i <= athNum; i++) {
			int bet;
			cin >> bet;
			betSum += bet;
			if (i == winUser) {
				winBet = bet;
			}
		}
		
		if (!winBet) {
			cout << 0 << endl;
		}else {
			double exRate_d = (double)exRate / 100;
			betSum *= 100;
			int price = (int)((betSum - betSum * exRate_d) / winBet);
			cout << price << endl;
		}
	}

	return 0;
}

C++: #include<iostream>

int main(){
	int n, m, p;
	while(std::cin >> n >> m >> p, n){
		int mn, s = 0;

		for(int i=1;i<=n;i++){
			int j;
			std::cin >> j;
			if(i == m)mn = j;
			s += j;
		}
		if(mn == 0)std::cout << 0 << std::endl;
		else std::cout << s*(100-p)/mn << std::endl;
	}
}