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 std::cin;
using std::cout;
using std::endl;

int main(void) {
	int N,M,P;
	
	cin >> N;
	cin >> M;
	cin >> P;

	while (N != 0 || M != 0 || P != 0) {
		int vote;
		int vote_w;
		int sum_vote = 0; 
		int r;
		for (int i = 0; i < N; i++) {
			cin >> vote;
			sum_vote += vote;
			if (i+1 == M) {
				vote_w = vote;
			} 
		}
		if (vote_w > 0) {
			r = ((sum_vote*100) * (100-P));
			r = r/(100*vote_w);
		}else {
			r = 0;
		}
		cout << r << endl; 
		
		cin >> N;
		cin >> M;
		cin >> P;
	}
	return 0;
}

C++: #include <iostream>
using namespace std;
int main(void){
    int n, m, p;
    while (cin >> n >> m >> p && n) {
        int t = 0, w;
        for (int i = 0; i < n; ++i) {
            int v;
            cin >> v;
            t += v;
            if (i == m - 1) w = v;
        }
        if (w == 0)
            cout << 0 << endl;
        else 
            cout << t * (100 - p) / w << endl;
    }
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<cstdlib>
#include<cstring>
#include<queue>
#include<cmath>
#include<functional>
#include<numeric>
//#include<>
using namespace std;

#define REP(i, n) for(int i=0;i<(int)(n);i++)
#define REPS(i, n) for(int i=1;i<=(int)(n);i++)
#define RREP(i, n) for(int i=(int)n-1;i>=0;i--)
#define RREPS(i, n) for(int i=(int)n;i>0;i--)
#define ALL(a) a.begin(), a.end()
#define RALL(a) a.rbegin(), a.rend()
#define pb push_back
#define eb emplace_back

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

int n, m;

int main(){
	ios::sync_with_stdio(false);
	cin.tie(false); cout.tie(false);
	while(cin >> n){
		if(!n)break;
		int m,p;
		cin>>m>>p;
		vector<int> a(n);
		REP(i,n)
			cin>>a[i];
		ll sum=accumulate(ALL(a),0ll);
		cout<<(a[m-1]?sum*(100-p)/a[m-1]:0)<<endl;
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<set>
using namespace std;
int main() {
	int n, p, m;
	while (cin >> n >> p >> m&&n != 0) {
		double sum , x,parson;
		int  a = 0;
		for (int i = 0; i < n; i++) {
			cin >> x;
			a += x;
			if (i == p - 1) parson += x;
		}
		sum = a * 100 * (1 - m / 100);
		cout << floor(sum/parson) << endl;
	}
}

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

void solve(int n,int m,int p){
    vector<int> v;
    int a;
    int sum=0;
    for(int i=0;i<n;i++){
        cin >> a;
        sum+=a;
        v.push_back(a);
    }
    if(v[m-1]) cout<<(sum*(100-p)/v[m-1])<<endl;
    else cout<<0<<endl;
}


int main(void){
    int a,b,c;
    while(cin>>a>>b>>c,a){
        solve(a,b,c);
    }
    
}

C++: #include<iostream>

using namespace std;

int main(){
  int N,M,P,X[1000],kazu=0,kane=0;
  while(1){
      cin>>N;
      cin>>M;
      cin>>P;
      if(N==0 && M==0 && P==0){
        break;
      }
      for(int lop=0;lop<N;lop++){
          cin>>X[lop];
          kazu+=X[lop];
      }
      if(X[M-1]==0){
        cout<<0<<endl;
      }else{
        kane=kazu*100;
        kane*=(1-P*0.01);
        kane=kane/X[M-1];
        cout<<kane<<endl;
      }
      kane=0;
      kazu=0;
      for(int lop=0;lop<N;lop++){
          X[lop]=0;
      }
  }

  return 0;
}

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

using namespace std;

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

C++: #include<iostream>
#include<vector>
#include<string>
#include<cmath>
#include<algorithm>
#include<set>
using namespace std;
int main() {
	int n, p, m;
	while (cin >> n >> p >> m&&n != 0) {
		double sum , x;
		int parson = 0, a = 0;
		for (int i = 0; i < n; i++) {
			cin >> x;
			a += x;
			if (i == p - 1) parson += x;
		}
		sum = a * 100 * (1 - m / 100);
		cout << (sum/parson) << endl;
	}
}

C++: #define _CRT_SECURE_NO_WARNINGS
//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef pair<int,int> pii;
#define all(c) (c).begin(), (c).end()
#define loop(i,a,b) for(ll i=a; i<ll(b); i++)
#define rep(i,b) loop(i,0,b)
#define pb push_back
#define eb emplace_back
#define mp make_pair
#define mt make_tuple
template<class T> ostream & operator<<(ostream & os, vector<T> const &);
template<int n, class...T> typename enable_if<(n>=sizeof...(T))>::type _ot(ostream &, tuple<T...> const &){}
template<int n, class...T> typename enable_if<(n< sizeof...(T))>::type _ot(ostream & os, tuple<T...> const & t){ os << (n==0?"":" ") << get<n>(t); _ot<n+1>(os, t); }
template<class...T> ostream & operator<<(ostream & os, tuple<T...> const & t){ _ot<0>(os, t); return os; }
template<class T, class U> ostream & operator<<(ostream & os, pair<T,U> const & p){ return os << "(" << p.first << ", " << p.second << ") "; }
template<class T> ostream & operator<<(ostream & os, vector<T> const & v){ rep(i,v.size()) os << v[i] << (i+1==(int)v.size()?"":" "); return os; }
#ifdef DEBUG
#define dump(...) (cerr<<#__VA_ARGS__<<" = "<<mt(__VA_ARGS__)<<" ["<<__LINE__<<"]"<<endl)
#else
#define dump(...)
#endif

string boin[256];
string ciin[256];

void f(char bu, int dir){
    if(ciin[bu]=="y" || ciin[bu]=="w"){
        if(ciin[bu]=="y"){
            cout << "y";
            if(dir == 'T') cout << "a";
            if(dir == 'U') cout << "u";
            if(dir == 'D') cout << "o";
        } else {
            if(dir == 'U') cout << "nn";
            if(dir == 'T') cout << "wa";
            if(dir == 'T') cout << "wo";
        }
    } else {
        cout << ciin[bu] << boin[dir];
    }
}

int main(){
    ciin['1'] = "";
    ciin['2'] = "k";
    ciin['3'] = "s";
    ciin['4'] = "t";
    ciin['5'] = "n";
    ciin['6'] = "h";
    ciin['7'] = "m";
    ciin['8'] = "y";
    ciin['9'] = "r";
    ciin['0'] = "w";
    boin['T'] = "a";
    boin['L'] = "i";
    boin['U'] = "u";
    boin['R'] = "e";
    boin['D'] = "o";
    string s;
    while(cin >> s){
        rep(i,s.size()){
            f(s[i],s[i+1]);
            i+=1;
        }
        cout << endl;
    }
}