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

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

C++: #include<iostream>

using namespace std;

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

        cout<<(int)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(){
	while(1){
		int n, m, p, x, total, tickets;
		double ans;
		cin >> n >> m >> p;
		if (n==0 && m==0 && p==0) return 0;
		total = 0;
		for(int i=1; i<=n; i++){
			cin >> x;
			total += x;
			if (i==m) tickets = x;
		}
		if (tickets==0) ans = 0;
		else	 ans = (total*(100-p))/tickets;
		cout << (int)ans << endl;
	}
	return 0;
}

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

using namespace std;

#define pb(n)	push_back(n)
#define mp(n,m) make_pair(n,m)
#define fi 	first
#define se 	second
#define all(r) (r).begin(),(r).end()

#define REP(i,s,e)	for(int i=(s); i<(e); i++)
#define rep(i,n)	REP(i,0,n)
#define REPE(i,s,e)	for(int i=s; i>e; i--)
#define repe(i,n)	REPE(i,n,-1)


typedef long long ll;
typedef vector<int> vi;
typedef vector<ll> vl;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;

typedef vector<vi> vii;

const int IMAX = ((1 << 30) - 1) * 2 + 1;
const int INF = 100000000;
const double EPS = 1e-10;
//int mod=1000000007








int main(){
	int n, m, p;
	while (cin >> n >> m >> p){
		if (n == 0 && m == 0 && p == 0) break;
		int sum = 0, w, t;
		for (int i = 0; i < n; i++){
			cin >> t;
			sum += t;
			if (i == m - 1) w = t;
		}
		double d = (double)sum*(100 - p) / 100;
		if (w == 0)cout << "0" << endl;
		else cout << (int)(d / w) << endl;
	}

}

C++: 
#include <iostream>
#include <stdio.h>
#include <string>
#include <vector>
#include <stdlib.h>

using namespace std;

int main(void){
	//FILE* fp_in = freopen("data.txt", "r", stdin);

	while(1) {
		/*
			numは販売した券の総数
			divは優勝者への投票数
		*/
		int N, M, P, div, num = 0, ans;
		cin >> N >> M >> P;

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

		for(int i = 0; i < N; i++) {
			int tmp;
			cin >> tmp;
			num += tmp;
			if(M == i + 1) div = tmp; 
		}
		if(div == 0) {
			cout << 0 << endl;
		} else {
			ans = 100 * num;	//総売り上げ
			ans -= P*ans/100;	//控除
			ans /= div;
			cout << ans << endl;
		}

	}

	//while(1){}
	return 0;
}

C++: #include <bits/stdc++.h>
#define FOR(i,a,n) for(int i=(a); i<(n); i++)
#define rep(i,n) for(int i=0; i<(n); i++)
#define per(i,n) for(int i=(n)-1; i>=0; i--)
#define all(v) v.begin(), v.end()
#define debug(var) do{cout << #var << " : "; print(var); } while(0)
using namespace std;
typedef long long ll;
void print() { cout << endl; }
template <class Head, class... Tail> void print(Head&& head, Tail&&... tail) { cout << head; if (sizeof...(tail) != 0) cout << " "; print(forward<Tail>(tail)...); }
template <class T> void print(vector<T> &vec) { for (auto& a : vec) { cout << a; if (&a != &vec.back()) cout << " "; } cout << endl; }
template <class T> void print(vector<vector<T>> &df) { for (auto& vec : df) { print(vec); } }
const int INF = 1e9;
const int MOD = 1e9+7;

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

	while (true) {
		int n, m, p; cin >> n >> m >> p;
		if (n==0 && m==0 && p==0) break;

		float total = 0.0;
		int bet = 0;
		FOR(i, 1, n+1) {
			int x; cin >> x;
			total += x;
			if (i==m) bet = x;
		}
		// print(total, p, bet);
		total *= 100;
		total = total * (100-p) / 100.0;
		if (bet) cout << floor(total / bet) << endl;
		else cout << 0 << endl;
	}
}

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

C++: #include<iostream>
#include <stdio.h>
#include <string>
#include <vector>
using namespace std;
int x,a,b,c,ac=0,tot=0;
int main(){
	while(cin>>a>>b>>c){
		if(a==0){break;}
	for(int i=0;i<a;i++){
	cin>>x;tot+=x;
	if(i+1==b){
	ac+=x;}}
	if(ac==0){
		cout<<0<<endl;}else{
		cout<<tot*(100-c)/ac<<endl;}
	ac=0;x=0;tot=0;}

    return 0;}

C++: #include <iostream>

using namespace std;

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

C++: #include <iostream>

using namespace std;

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

int nextInt() { int d; cin >> d; return d; }

int main() {
  while (true) {
    int N = nextInt();
    int M = nextInt() - 1;
    int P = nextInt();

    if (N + M + P == -1) break;

    int sum = 0;
    int xm = 0;
    REP(i, N) {
      int x = nextInt();
      sum += x;
      if (i == M) xm = x;
    }
    if (xm == 0) {
      cout << 0 << endl;
    } else {
      cout << sum * (100 - P) / xm;
    }
   
  }
  return 0;
}

C++: #include <iostream>

using namespace std;


int n,m,p;
int mem[101];
void solve(){

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

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<string>
#include<utility>
#include<map>
#include<set>
#include<queue>
#include<math.h>
using namespace std;
#define N (1000000000+7)
#define INF 1e16
typedef long long ll;
typedef pair<int,int> P;



int main(void){
    while(true){
        int m,n,p;
        cin>>m>>n>>p;
        if(m==0 && n==0 && p==0)break;
        int total=0;
        int winnum=0;
        for(int i=0;i<m;i++){
            int x;
            cin>>x;
            total+=x;
            if(i==n-1)winnum=x;
        }
        total*=100;
        total=total*(100-p)/100;
        if(winnum!=0){
            int ans=(int)total/winnum;
            cout<<ans<<endl;
        }
        else cout<<0<<endl;
    }
    return 0;
}

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

using namespace std;

int main(void){

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

    int a,b;
    int total = 0;
    bool f = false;

    for( int i = 1 ; i <= n ; i++ ){
      cin >> a; 
      if(i == m && a){
	f = true;
	b = a;
      }
      total += a;
    }
    if(f){
      total = total * 100 * (100 - p)/ (b * 100);
      printf("%.0d", total);
      cout << endl;
    }else cout << "0" << endl;
  }
  return 0;
}