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;
	int x[101];
	while (cin >> n >> m >> p && n != 0 && m != 0 && p != 0)
	{
		int sum = 0;
		for (int i = 1; i <= n; i++)
		{
			cin >> x[i];
			sum += x[i];
		}
		if (x[m] == 0)
		{
			cout << 0 << endl;
			continue;
		}
		sum *= 100;
		int ans = (sum / x[m]) - (sum / x[m]) * (p * 0.01);
		cout <<  ans << endl;

	}
	return 0;
}

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

C++: #include<iostream>
#include<map>
#include<vector>
#include<list>
#include<algorithm>
#include<cmath>
#include<iomanip>
#include<numeric>
#include<climits>
#include<ctime>
#include<cstring>
#define REP(i,p,n) for(int i=p;i<(int)(n);i++)
#define rep(i,n) REP(i,0,n)
#define rep_split(tok,a_str,re) for(char *tok = strtok((char *)a_str.c_str(),re); tok != NULL; tok = strtok(NULL,re))
#define all(c) (c).begin(), (c).end()

using namespace std;
template<class T> inline void chmax(T& a, T b) { if(b > a) a = b; }
template<class T> inline void chmin(T& a, T b) { if(b < a) a = b; }

int main() {
	bool keys[(int)'z'+1];
	rep(i,(int)'z'+1) {
		keys[i] = false;
	}
	keys['y']=true; keys['u']=true; keys['i']=true;
	keys['o']=true; keys['p']=true;
	keys['h']=true; keys['j']=true;
	keys['k']=true; keys['l']=true;
	keys['n']=true; keys['m']=true;

	string a_str;
	bool is_right_back;
	bool is_right;
	bool is_first;
	int cnt;
	while(cin >> a_str) {
		is_first = true;
		cnt = 0;
		if (a_str[0] == '#') { break; }
		rep(i,a_str.size()) {
			if (!is_first) {
				is_right = keys[(int)a_str[i]];
				if (is_right != is_right_back) {
					cnt++;
				}
			}
			is_right_back = keys[(int)a_str[i]];
			is_first = false;
		}
		cout << cnt << endl;
	}

	return 0;
}

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

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

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

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

int main(){
  int n,m,p;
  int x[100];

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

    sum *= 100*(100-p);
    sum /= 100;

    if(!x[m-1])cout << 0 << endl;
    else cout << sum/x[m-1] << endl;
  }
}

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

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

		ans = 0;
		for(int i = 1; i <= n; i++){
			int x;
			cin >> x;
			ans += x;
			if(i == m) m = x;
		}

		
		if(m == 0){
			ans = 0;
		}else{
			ans = ans * (100-p) / m;
		}

		cout << ans << endl;
	}

	return 0;
}

C++: #include <iostream>

using namespace std;

int main(int argc, char **)
{
	int n, m, s, t, tmp;
	float p;
	
	while(1){
		cin >> n >> m >> p;
		if(n == 0){
			break;
		}
		
		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" << endl;
			continue;
		}
		
		cout << (int)(p*s/t) << endl;
	}
	
	return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <vector>
#include <stack>
#include <queue>
#include <map>
#include <cmath>
#include <string>
#include <sstream>
#include <iomanip>
#include <complex>

using namespace std;


#define ll long long
#define vvi vector< vector<int> >
#define All(X) X.begin(),X.end()
#define FOR(i,a,b) for(int i=(int)(a);i<(int)(b);i++)
#define REP(i,n) for(int i=0;i<(int)(n);i++)
#define pb push_back 
ll gcd(ll a,ll b){return b?gcd(b,a%b):a;}
ll lcm(ll a,ll b){return a/gcd(a,b)*b;}
//wrong answer

int main(){

  while(1){

	int n,m;
	double p;
	int x[200];
	int ans;
	double sum=0;

	cin >> n >> m >> p;

	if(n==0&&m==0&&p==0)
	  break;

	m--;

	REP(i,n){
	  cin >> x[i];
	  sum += x[i];
	}

	sum = sum * 100;
	if(x[m]==0){
	  ans = 0;
	}else{
	  ans = sum * (1.0-p*0.01) / x[m];
	}

	cout << ans <<endl;

  }

}

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 << sum*(100-p)/hito << '\n';
      }
    }
  }
}

C++: #include <iostream>

using namespace std;

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

  while(1){
    int max=0;
    cin>>N>>M>>P;
    
    if(N==0 && M==0 && P==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 <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]!=0)cout<<sum/num[m]<<endl;
		else cout<<0<<endl;
	}
}

C++: #include<iostream>
#include<iomanip>
#include<algorithm>
#include<string>
#include<map>
#include<cmath>
#include<queue>	

using namespace std;

namespace MyLib {
#define ALL(a) a.begin(),a.end()
#define REP(i,n) for(int i=0;i<n;i++)
#define RREP(i,n) for(int i=n-1;i>=0;i--)
#define debug(x) if(1)cout<<#x<<":"<<x<<endl;
#define DEBUG(x) if(1)cout<<#x<<":"<<x<<endl;
#define ll long long
}

using namespace MyLib;


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



	}

	return 0;

}

C++: #include<cstdio>
using namespace std;
int main(void)
{
	int n,m,p,i,j,x[101],sum,cnt,ans;
	while(1)	{
		scanf("%d %d %d",&n,&m,&p);
		if(n==0 && m==0 && p==0)	break;
		sum=0;
		for(i=1;i<=n;i++)	{
			scanf("%d",&x[i]);
			sum+=x[i];
		}
		sum=sum*100*(100-p)/100;
		if(x[m]==0)	printf("0\n");
		else {
			ans=sum/x[m];
			printf("%d\n",ans);
		}
	}
	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[100], sum = 0;
		for (int i = 0; i < n; ++i) {
			cin >> X[i];
			sum += X[i];
		}
		sum *= 100-p;
		cout << (X[m] == 0 ? 0 : sum / X[m]) << endl;
	}
}