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 <iomanip>
#include <sstream>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cfloat>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <algorithm>
#include <functional>
#include <utility>
#include <numeric>
#include <iterator>

using namespace std;

typedef long long LL;
typedef unsigned long long ULL;
typedef vector<int> VI;
typedef vector<VI> VVI;
typedef vector<string> VS;
typedef pair<int,int> PII;
typedef istringstream ISS;
typedef ostringstream OSS;

#define REP( i, m, n ) for ( int i = (int)( m ); i < (int)( n ); ++i )
#define FOR( v, c ) for ( auto &v : c )

#define EACH( it, c ) for ( auto it = c.begin(); it != c.end(); ++it )
#define ALL( c ) (c).begin(), (c).end()
#define DRANGE( c, p ) (c).begin(), (c).begin() + p, (c).end()

#define PB( n ) push_back( n )
#define MP( a, b ) make_pair( ( a ), ( b ) )
#define EXIST( c, e ) ( (c).find( e ) != (c).end() )

#define fst first
#define snd second

#define DUMP( x ) cerr << #x << " = " << ( x ) << endl
#define DEBUG( x ) cerr << __FILE__ << ":" << __LINE__ << ": " << #x << " = " << ( x ) << endl

int main()
{
	cin.tie( 0 );
	ios::sync_with_stdio( false );

	while ( true )
	{
		int n, m, p;
		cin >> n >> m >> p;

		if ( !( n | m | p ) )
		{
			break;
		}

		VI xs( n );
		FOR( x, xs )
		{
			cin >> x;
		}

		int total = accumulate( ALL( xs ), 0 ) * 100;
		int rest = 1. * total * ( 1. - p / 100. );

		if ( xs[ m - 1 ] == 0 )
		{
			cout << 0 << endl;
		}
		else
		{
			cout << (int)( rest / xs[ m - 1 ] ) << endl;
		}
	}

	return 0;
}

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

#define int long long

signed main()
{
    int n, m, p;
    while(cin>>n>>m>>p, n) {
        int t = 0;
        int sum = 0;
        for(int i=1; i<=n; ++i) {
            int a;
            cin >> a;
            sum += a*100;
            if(i==m) t = a;
        }

        sum = sum - sum*p/100;
        if(t==0) cout << 0 << endl;
        else cout << sum/t << endl;
    }
    return 0;
}

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

#define int             long long
#define FOR( i, m, n )  for( int (i) = (m); (i) < (n); (i)++ )
#define REP( i, n )     FOR( i, 0, n )
#define REPR( i, m )    for( int (i) = (m); (i) >= 0; (i)-- )
#define REPONE( i, n )  FOR( i, 1, n + 1 )
#define ALL( a )        (a).begin(), (a).end()
#define MP              make_pair

typedef pair<int, int> P;

template<class T>bool chmax( T& a, const T& b ) { if( a < b ) { a = b; return 1; } return 0; }
template<class T>bool chmin( T& a, const T& b ) { if( a > b ) { a = b; return 1; } return 0; }

const int INF = 1e9;
const int MOD = 1e9 + 7;

signed main(){
  int N, v, p, sum;
  while( cin >> N >> v >> p, N ){
    sum = 0;
    vector<int> x( N );
    REP( i, N ){
      cin >> x[i];
      sum += x[i] * 100;
    }
    sum = sum * ( 100 - p ) / 100;

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

}

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

int main(){
  int n,m,h;
  int data[110];
  while(1){
    cin >> n >> m >> h;
    if(n == 0 && m == 0 && h == 0) break;
    int sum = 0;
    for(int i=0;i<n;i++){
      cin >> data[i];
      sum += data[i];
    }
    if(data[m-1]==0) {
      cout << "0" << endl;
      continue;
    }
    sum = sum * 100;
    sum = sum * h;
    sum = sum / 100;
    cout << sum / data[m-1] << endl;
  }
}

C++: #include <vector>
#include <map>
#include <set>
#include <stack>
#include <queue>
#include <deque>
#include <algorithm>
#include <utility>
#include <functional>
#include <sstream>
#include <iostream>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>
#include <climits>

using namespace std;

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 vector<int> vi;
typedef vector<vi>  vvi;
typedef vector<string> vs;
typedef pair<int, int> pii;
typedef long long ll;

#define ALL(a) (a).begin(),(a).end()
#define RALL(a) (a).rbegin(),(a).rend()
#define EACH(t,i,c) for(t::iretator i=(c).begin(); i!=(c).end(); ++i)
#define EXIST(s,e) ((s).find(e)!=(s).end())
#define FOR(i,a,b) for(int i=(a);i<(b);++i)
#define REP(i,n) FOR(i,0,n)

const double EPS = 1e-10;

int main() {
	int n, m, p;

	while(cin >> n >> m >> p, n, m, p) {
		vi player(n, 0);
		int sum = 0;

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

		sum *= (100-p);

		if(player[m-1]) {
			cout << sum/player[m-1] << endl;
		} else {
			cout << "0" << endl;
		}
	}


}

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

int main() {
	int a, b, c;
	while (cin >> a >> b >> c, a | b | c) {
		map<int, int>d;
		int s = 0;
		for (int e = 0; e < a; e++) {
			int f;
			cin >> f;
			s += f;
			d[e + 1] = f;
		}
		int g = (100-c)*s;
		if(d[b])cout << g / d[b] << endl;
		else cout << 0 << endl;
	}
}

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

int main(){
  int n,m,p;

  while((cin>>n>>m>>p)&&(n!=0)&&(m!=0)&&(p!=0)){
    vector<int> x;
    int sum=0;
    for(int i=0;i<n;i++){
      int var;
      cin >> var;
      x.push_back(var);
      sum += var;
    }

    if(x[m-1]==0) cout << 0 << endl;
    else{
      int all_money=sum*100;
//      cout << "all " << all_money << endl;
      int nokorinokane=all_money-(int)((double)all_money*((double)p/100.0));
 //     cout << nokorinokane << endl;
      int haitou=(int)(nokorinokane/x[m-1]);
      cout << haitou << endl;
    }
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <iomanip>
#include <map>
#include <set>
#include <queue>
#include <stack>
#include <numeric>
#include <bitset>

static const int MOD = 1000000007;
using ll = long long;
using u32 = uint32_t;
using namespace std;

template<class T> constexpr T INF = ::numeric_limits<T>::max()/32*15+208;

int main() {
    int n, m, p;
    while(cin >> n >> m >> p, n|m|p){
        vector<int> v(n);
        for (auto &&i : v) scanf("%d", &i);
        if(v[m-1] == 0){
            puts("0");
            continue;
        }
        int s = accumulate(v.begin(), v.end(), 0);
        cout << s*(100-p)/v[m-1] << "\n";
    }

    return 0;
}

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

int main(){
  int N, M, P, t, s, x;
  while (cin >> N >> M >> P, N||M||P){
    t = 0;
    s = 0;
    for (int i = 0; i < N; ++i){
      cin >> t;
      s += t;
      if (i == M-1) x = t;
    }
    if (x) cout << s*(100-P)/x << endl;
    else cout << 0 << endl;
  }
  return 0;
}

C++: #include <sstream>
#include <string>
#include <vector>
#include <map>
#include <algorithm>
#include <iostream>
#include <utility>
#include <set>
#include <cctype>
#include <queue>
#include <stack>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <climits>
using namespace std;
#define INF 100000000
typedef long long ll;

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