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;
  bool flag = true;
  
  while(cin >> n >> m >> p && n && m && p){
    int sum=0, x, win;
    for(int i=0; i<n; i++){
      cin >> x;
      sum+=x;
      if(m==i+1){
        win=x;
        if(win==0){
          cout << 0 << endl;
          flag = false;
          break;
        }
      }
    }
    if(flag){
      sum = sum * 100 * (100-p) / 100;
      int ans = sum / win;
      cout << ans << endl;
    }
    sum=0;
    flag = true;
  }

  return 0;
}

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

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

using namespace std;

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

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

using namespace std;

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

C++: #include <cstdio>

int N, M, P, S, X[101];

int main()
{
	while (true)
	{
		scanf("%d%d%d", &N, &M, &P);

		if (N == 0) { break; }

		for (int i = 1; i <= N; i++) { scanf("%d", &X[i]); S += X[i]; }

		printf("%d\n", X[M] == 0 ? 0 : (100 - P) * S / X[M]);
	}

	return 0;
}

C++: #include<iostream>
#include<algorithm>
#include<vector>
#include<cstdio>
#include<cmath>
using namespace std;

#define ll long long int
#define ld long double
#define reps(i,f,n) for(int i=f;i<n;i++)
#define rep(i,n) reps(i,0,n)
#define m1 cout<<"move1"<<endl
#define m2 cout<<"move2"<<endl
#define m3 cout<<"move3"<<endl
#define m4 cout<<"move4"<<endl


int main(){
  ll N,P,M;
  vector<ll> v(100);
  ll ans = 0;
  ll sum = 0;

  
  while(cin>>N>>M>>P,N,M,P){
    ans = 0;
    sum = 0;

    rep(i,N){
      v[i] = 0;
      cin>>v[i];
      sum += v[i];
    }
    if( v[M -1] != 0){
      ans = (ld)(((ld)sum * 100) * ( 100.0 - (ld)P) * 0.01) / (ld)v[M-1];
  
    }
    else{
      ans = 0;
    }

    cout<<ans<<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 += 100 * X[i];
    }
    sum = sum * (100 - P) / 100;
    if(X[M-1] > 0){ cout << sum / X[M-1] << endl;}else{ cout << 0 << endl;}
  }
}

C++: #include<cstdio>

int n,m,p;
int x[101];

int main(void){
	while(1){
		scanf("%d %d %d",&n,&m,&p);
		if(n+m+p==0)break;
		int all=0;
		for(int i=0;i<n;i++){
			scanf("%d",&x[i]);
			all+=x[i];
		}
		all*=(100-p);
		printf("%d\n",x[m-1]>0?all/x[m-1]:0);
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **)
{
	int n, m, t = -1, tmp;
	float p, s;
	
	while(1){
		cin >> n >> m >> p;
		if(n == 0){
			break;
		} else if(t != -1){
			cout << endl;
		}
		
		p = 1.0 - p/100;
		s = 0;
		for(int i = 1; i <= n; i++){
			cin >> tmp;
			s += tmp*100;
			if(i == m){
				t = tmp;
			}
		}
		
		if(t == 0){
			cout << "0";
			continue;
		}
		
		cout << (int)(p*s/t);
	}
cout << endl;	

	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <complex>
#include <cstdio>
#include <map>
#include <math.h>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
using namespace std;

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

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

int main(){
	while(cin>>N>>M>>P&&N){
		int sum=0;
		rep(i,N){cin>>X[i+1];sum+=X[i+1];}
		if(!X[M]){cout<<"0"<<endl;continue;}
		cout<<sum*(100-P)/X[M]<<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-b;
    if(in[a-1]==0)cout<<0<<endl;
    else cout<<(int)(sum/in[a-1])<<endl;
  }

}

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

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

C++: #include <bits/stdc++.h>
using namespace std;
int X[100];
int main() {
    int N,M,P;
    while(scanf("%d %d %d",&N,&M,&P),N) {
        int sum=0;
        for(int i=0;i<N;i++) scanf("%d",&X[i]),sum+=X[i]*100;
        sum-=sum*P/100;
        if(X[M-1]==0) printf("0\n"); else printf("%d\n",sum/X[M-1]);        
    }
}

C++: #include<iostream>
#include<vector>
#include<map>
#define P pair<int,int>
using namespace std;
int main(){
int n,m;double p;
while(cin>>n>>m>>p,n||m||p){
	int maisu=0,tmp,atari;
	double ans=0;
	for(int i=0;i<n;i++){
		cin>>tmp;
		maisu+=tmp;
		if(i+1==m)atari=tmp;
	}
	p=1-(p/100);
	if(atari==0)ans=0;
	else ans=maisu*100/atari*p;
	cout<<(int)ans<<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&&b==0&&c==0)break;
	if(b==0)cout<<0;
	else{
for(i=0;i<a;i++){
cin>>d;
sum+=d;
if(i==b-1)e=d;
}

if(c==100)cout<<0;
else {sum=(double)sum*(100-c)/e;cout<<sum;}
}
cout<<endl;
}
return 0;
}

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 != 0 && m != 0 && p != 0) {
		double sum = 0;
		int x = 0, t = 0;
		for (int i = 1; i <= n; i++) {
			cin >> x;
			sum += (x * 100);
			if (i == m) t = x;
		}
		double a = (100-(double)p) / 100;
		sum *= a;
		if (t == 0) cout << 0 << endl;
		else cout << floor(sum / t) << 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 correct=0;
    for(int i=0;i<n;i++){
      int input;
      cin>>input;
      sum+=input;
      if(i+1==m) correct=input;
    }
    sum=sum*(100-p);
    if(correct==0)
      cout<<0<<endl;
    else
      cout<<sum/correct<<endl;

  }
}