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++: #define _CRT_SECURE_NO_WARNINGS // #pragma warning(disable:4996)
#include <iostream>
#include <cstdio>
#include <cstring>
#include <algorithm>
#include <vector>
#include <string>
#include <queue>
#include <functional>
#include <sstream>
#include <cmath>
#include <set>
#include <map>
using namespace std; 

#define rep(i,a,b) for(int i=(a);i<(b);i++)
#define pb push_back
#define mp(a,b) make_pair(a,b)
#define all(a) a.begin(),a.end()
#define len(x) ((int)(x).size())
#define tmax(a,b,c) max((a),max((b),(c)))
#define tmin(a,b,c) min((a),min((b),(c)))
#define debug(x) cerr << #x << " is " << x << endl;

typedef pair<int, int> Pii;
typedef vector<int> Vi;
typedef vector<vector<int> > VVi;
typedef long long ll;
const int inf = 2e9;
const ll ll_inf = 1e17;
const int mod = 1e9 + 7;
const long double eps = 1e-10;

int a[101];

int main()
{
	while(1) {
		int n, m, p;
		cin >> n >> m >> p;
		if (!n && !m && !p) break;
		int sum = 0;
		rep(i,0,n) {
			cin >> a[i];
			sum += a[i];
		}
		m--;
		if (!a[m]) {
			cout << 0 << endl;
			continue;
		}

		double b = sum * 100 * ((double)(100-p) / 100);
		cout << floor(b / a[m]) << endl;
	}

	return 0;
}

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

int main()
{
  int N, M, P;
  while( cin >> N >> M >> P, N && M && P ) {
    int X[100];
    int sum = 0;
    for(int i=0; i<N; i++) cin >> X[i], sum += X[i];
    if( X[M-1] == 0 || P == 100 ) cout << 0 << endl;
    else cout << sum*100 * (100-P) / X[M-1] / 100 << endl;
  }
}

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(){
    ld N,P,M;
    vector<ll> v(100,0);
    ld ans = 0;
    ld sum = 0;
    while(cin>>N>>M>>P,N+M+P){
        ans = 0;
        sum = 0;
        rep(i,N){
            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>
#include<string.h>
#include<string>
#include<cstdio>
#include<algorithm>
#include<stack>
#include<queue>
#include<vector>
#include<cmath>
#include<utility>
#include<set>
#define ll long long int
#define ld long double
#define INF 1000000000
#define EPS 0.0000000001
#define rep(i,n) for(i=0;i<n;i++)
using namespace std;
typedef pair<int, int> pii;

int main()
{
  int n,m,p,x;
  int num[105]={};
  int i;

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

}

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

int main(){
	int n,m,p,i,array[100],a,price;
	double pd,priced,tmpp;
	while(cin >> n >> m >> p && (n != 0 && m != 0 && p != 0)){
		memset(array,0,sizeof(array));
		price = 0;
		tmpp = (double)p;
		pd = (double)(1.0 - (tmpp / 100));
		for(i = 0;i < n;i++){
			cin >> a;
			array[i] = a;
			price += a * 100;
		}
		priced = (double)(price * pd);
		if(array[m-1] != 0){
			cout << (int)(priced / array[m-1]) << endl;
		}
		else {
			cout << 0 << endl;
		}
	}
	return 0;
}

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

int main(){

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

}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <queue>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <fstream>
#include <stdio.h>
#include <complex>

using namespace std;

//conversion
//------------------------------------------
inline int toInt(string s) {int v; istringstream sin(s);sin>>v;return v;}
template<class T> inline string toString(T x) {ostringstream sout;sout<<x;return sout.str();}

//typedef
//------------------------------------------
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int, int> PII;
typedef pair<int, PII> TIII;
typedef long long LL;
typedef vector<LL> VLL;

//container util

//------------------------------------------
#define ALL(a)  (a).begin(),(a).end()
#define RALL(a) (a).rbegin(), (a).rend()
#define PB push_back
#define MP make_pair
#define SZ(a) int((a).size())
#define EACH(i,c) for(typeof((c).begin()) i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define SORT(c) sort((c).begin(),(c).end())
#define MT(a,b,c) MP(a, MP(b, c))
#define T1 first
#define T2 second.first
#define T3 second.second

//repetition
//------------------------------------------
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n)  FOR(i,0,n)

int main(){
	while(1){
		int n,m,p;
		cin>>n>>m>>p;
		if(n==0)break;
		int ret, M=0,S=0;
		REP(i,n){
			int tmp;
			cin>>tmp;
			S+=tmp;
			if(i==m-1)M=tmp;
		}
		if(M==0)ret=0;
		else ret = ((100*S*(100-p))/M)/100;
		cout << ret << endl;
	}
}

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

signed
main(){
	int N,M,P;
	while(cin >> N >> M >> P){
		if(N==0) break;
		vector<int> x(N);
		int sum = 0;
		for(int i=0;i<N;i++)
		{
			cin >> x[i];
			sum += x[i];
		}
		sum *= 100;
		double ret = sum * (100-P)/ (double)100;
		cout << ( (x[M-1]==0) ? 0 : (int)(ret/x[M-1]) ) << endl;
	}
}

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

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

int main(){
  while(cin >> n >> m >> p, n || m || p){
    int sum = 0;

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

    sum *= 100 - p;

    if(x[m - 1] == 0){
      cout << 0 << endl;
    }
    else{
      cout << (int)((double)sum / x[m - 1]) << endl;
    }
  }
}

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

using namespace std;

typedef unsigned long long ull;
#define loop(i,a,b) for(int i=(a);i<ull(b);++i)
#define rep(i,n) loop(i,0,n)

const double eps = 1e-10;
const double pi  = acos(-1.0);
const double inf = (int)1e8;

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

C++: #include<stdio.h>
int main()
{
	int N,M,P,i;
	while(scanf("%d%d%d",&N,&M,&P),N)
	{
		int a[101]={0},s=0;
		for(i=1;i<=N;++i)scanf("%d",&a[i]),s+=a[i];
		if(a[M])printf("%d\n",s*(100-P)/a[M]);
		else puts("0");
	}
	return 0;
}