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 <string>
#include <cstdlib>
#include <cmath>
#include <vector>
#include <map>
#include <set>
#include <algorithm>
#include <queue>
#include <stack>
#include <functional>
#include <bitset>
#include <assert.h>
#include <unordered_map>
#include <unordered_set>
using namespace std;
typedef long long ll;
typedef vector<ll> vl;
typedef vector<vl> vvl;
typedef vector<char> vc;
typedef vector<string> vs;
typedef vector<bool> vb;
typedef vector<double> vd;
typedef pair<ll,ll> P;
typedef vector<P> vpl;
typedef tuple<ll,ll,ll> tapu;
#define rep(i,n) for(ll i=0; i<(n); i++)
#define REP(i,a,b) for(int i=(a); i<(b); i++)
#define all(x) (x).begin(), (x).end()
#define rall(x) (x).rbegin(), (x).rend()
const int inf = 1<<30;
const ll linf = 1LL<<62;
const int MAX = 510000;
ll dy[8] = {0,1,0,-1,1,-1,1,-1};
ll dx[8] = {1,0,-1,0,1,-1,-1,1};
const double pi = acos(-1);
const double eps = 1e-7;
template<typename T1,typename T2> inline bool chmin(T1 &a,T2 b){
	if(a>b){
		a = b; return true;
	}
	else return false;
}
template<typename T1,typename T2> inline bool chmax(T1 &a,T2 b){
	if(a<b){
		a = b; return true;
	}
	else return false;
}
template<typename T1,typename T2> inline void print2(T1 a, T2 b){cout << a << " " << b << endl;}
template<typename T1,typename T2,typename T3> inline void print3(T1 a, T2 b, T3 c){
	cout << a << " " << b << " " << c << endl;
}
const int mod = 1e9 + 7;
//const int mod = 998244353;

int main(){
    while(1){
        ll n,m,p; cin >> n >> m >> p;
        if(!n && !m && !p) break;
        ll haitou = 100 - p;
        ll sum = 0;
        vl a(n);
        rep(i,n){
            cin >> a[i];
            sum += a[i];
        }
        if(a[m-1]==0) puts("0");
        else cout << haitou*sum / a[m-1] << endl;
    }
}

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

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

  while(true){
    cin >> N >> M >> P;
    if(!N && !M && !P) break;
    int nm[101],sum = 0;
    for(int i = 0 ; i < N ; i++){
      cin >> nm[i];
      sum += nm[i];
    }
    if(!nm[M-1]){
      cout << '0' << endl;
      continue;
    }
    int money = sum*(100-P)/nm[M-1];
    cout << money << endl;
  }

  return 0;
}

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

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

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

		cout << ans << endl;
	}

	return 0;
}

C++: // http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=2018

#include <iostream>
using namespace std;

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

C++: #include <iostream>
using namespace std;
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
char judge(int a[],int m1)
{
   int i,j,k,l;
   int x[100];
   int n; /* 投票の対象となる競技者の数 */
   int m; /* 優勝した競技者の番号 */
   int p; /* 控除率（百分率）を表す整数 */
   int sum = 0; /* 人数の合計 */
   cin >> n >> m >> p;
   if(n == 0 && m == 0 && p == 0) return 0;

   for(i=0;i<n;i++) {
      cin >> x[i];
      sum += x[i];
   }
   if(x[m-1])
      a[m1] = sum * (100-p) / x[m-1] ;
   else a[m1] = 0;
   return 1;
}



int main()
{
   int i,j,k,l;
   int m1;
   int a[100];
   int go = 1;
   for(i=0;go;i++) {
      go = judge(a,i);
   }
   i--;
   m1 = i;
   for(i=0;i<m1;i++)
      cout << a[i] << endl;
   return 0;
}

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

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

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

int main() {
  int n,m,k;
  while(cin >> n >> m >> k && (n||m||k)) {
    int price=0,a=0;
    for(int i=1; i<=n; i++) {
      int x;
      cin >> x;
      price+=x*100;
      if(i==m) a=x;
    }
    price-=price*k/100;
    if(a) cout << price/a << endl;
    else cout << 0 << endl;
  }
  return 0;
}