Go: package main

import (
	"bufio"
	"os"
	"strings"
	"strconv"
	"fmt"
)

func main() {
	scanner := bufio.NewScanner(os.Stdin)
	a := make([]float64, 10)
	for scanner.Scan() {
		info := strings.Split(scanner.Text(), ",")
		for j := 0; j < 10; j++ {
			a[j], _ = strconv.ParseFloat(info[j], 64)
		}
		v1, _ := strconv.ParseFloat(info[10], 64)
		v2, _ := strconv.ParseFloat(info[11], 64)
		sum := 0.0
		for i := 0; i < 10; i++ {
			sum += a[i]
		}
		match := v1 * ((sum/(v1+v2)))
		if match == 0 {
			fmt.Println(1)
		} else {
			sum = 0
			for k := 0; k < 10; k++ {
				sum += a[k]
				if match <= sum {
					fmt.Println(k+1)
					break
				}
			}
		}
	}
}

C++: #include <iostream>
#include <cmath>
#include <vector>
#include <cstdio>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(int)n;i++)
#define repp(i,r,n) for(int i=r;i<(int)n;i++)
using namespace std;
int in() {int x; cin >> x; return x;}

int main()
{
	int l[10];
	double v[2];
	while(scanf("%d",&l[0])!=EOF)
	{
		int m[99999]={};
		m[0]=1;
		for(int i=1;i<10;i++)scanf(",%d",&l[i]);
			char zzz,zzzz;
		cin>>zzz>>v[0]>>zzzz>>v[1];
		v[0]*=0.1;v[1]*=0.1;
		int now=0;
		for(int i=0;i<10;i++)
		{
			m[l[i]+now+1]++;
			now+=l[i];
		}
		for(int i=1;i<99999;i++)m[i]+=m[i-1];
			int nn=1;
		while(1)
		{
			nn+=(int)v[0];
			now-=(int)v[1];
			if(nn>now)
			{
				cout<<m[(nn+now)/2]<<endl;
				break;
			}
		}

	}

	return 0;

}

C++: #include <iostream>
#include <stdio.h>
#include <cstdio>
#include <math.h>
using namespace std;
int main(){
	int l[10],v1,v2;
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2) != EOF){
		int length=0;
		for(int i=0;i<10;i++){
			length += l[i];
		}
		double x=v1*length/(double)(v1+v2);
		int sum=l[0];
		for(int j=1;j<10;j++){
			if(sum>=x){
				cout<<j<<endl;
				break;
			}
			sum += l[j];
		}
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <stack>
#include <queue>
#include <deque>
#include <set>
#include <map>
#include <algorithm>	// require sort next_permutation count __gcd reverse etc.
#include <cstdlib>	// require abs exit atof atoi 
#include <cstdio>		// require scanf printf
#include <functional>
#include <numeric>	// require accumulate
#include <cmath>		// require fabs
#include <climits>
#include <limits>
#include <cfloat>
#include <iomanip>	// require setw
#include <sstream>	// require stringstream 
#include <cstring>	// require memset
#include <cctype>		// require tolower, toupper
#include <fstream>	// require freopen
#include <ctime>		// require srand
#define rep(i,n) for(int i=0;i<(n);i++)
#define ALL(A) A.begin(), A.end()

using namespace std;

typedef long long ll;
typedef pair<int, int> P;

int main()
{
//	cut here before submit 
//	freopen ("testcase.RL", "r", stdin );
	string str = "";
	while (getline (cin, str ) ){
		if (str.empty() ) break;
		int n = str.length();
		rep (i, n ){
			if (str[i] == ',' ) str[i] = ' ';
		} // end rep
		vector<int> l (12, 0 ), sum (12, 0 );
		int v1, v2;
		stringstream ss (str );
		for (int i = 1; i <= 10; i++ ){
			ss >> l[i];
		} // end rep
		l[11] = 100000;
		ss >> v1 >> v2;
		for (int i = 1; i <= 11; i++ ){
			sum[i] = sum[i-1] + l[i];
		} // end for
/*
		cerr << "sum: " << endl;
		rep (i, 10+1 ){
			cerr << sum[i] << (i != 10 ? ' ' : '\n' );
		} // end rep
*/
		double t = (double)sum[10]/(double)(v1 + v2 );
//		cerr << "t: " << t << endl;
		double cl = (double)v1*t;
//		cerr << "cl: " << cl << endl;
		int res = 0;
		for (int i = 1; i <= 10; i++ ){
			if ((double)sum[i-1] < cl && cl <= (double)sum[i] ){
				res = i;
				break;
			} // end if
		} // end for
		printf ("%d\n", res );

	} // end loop

		
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int b[10],i,v1,v2;
  double k[10],h;
  while (cin >> b[0] >> b[1] >> b[2] >> b[3] >> b[4] >> b[5] >> b[6] >> b[7] >> b[8] >> b[9] >> v1 >> v2) {
    k[0]=b[0];
	for (i=1;i<10;i++) k[i]=k[i-1]+b[i];
	h=v1*k[9]/(v1+v2);
	for (i=0;i<10;i++) if (h>=k[i]-b[i] && h<=k[i]) break;
	cout << i+1 << endl;
  }
  return 0;
  }

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

int main(){
	int l[10],va,vb,v,tl;
	double a,tv;
	char ch;
	while(1){
		tl = 0;
		if(cin.eof()) break;
		else {
			for(int i = 0;i < 10;++i){
				cin >> l[i];
				cin >> ch;
				tl += l[i];
			}
			cin >> va >> ch >> vb;
			v = va + vb;
			a = (double)tl / (double)v;
			tv = (double)va;
			tv *= a;
			for(int i = 0;i < 10;++i){
				tv -= (double)l[i];
				if(tv <= 0.0) {
					cout << i + 1 << endl;
					break;
				}
			}
		}
	}
	return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long l[10],v1,v2,len,point,now;
  while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)){
    len=0;
    for(int i=0;i<10;i++){
      len+=l[i];
    }
    //point=(v1*len)/(v1+v2)+((v1*len)%(v1+v2)>0);
    point=len*(v1/(v1+v2));
    now=0;
    for(int i=0;i<10;i++){
      now+=l[i];
      if(now>=point){
        cout << i+1 << endl;
        break;
      }
    }
  }
  return 0;
}

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

int main(){
	int l[12], v1, v2;
	double sum,sum2;

	while( scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
	&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2) != EOF ){

	        sum = 0;
		for(int i=1 ; i<=10 ; i++){
			sum += l[i];
		}
		sum2 = ((double)sum)/(double)((v1+v2))*(double)(v1);
		sum = 0;
		for(int i=1 ; i<=10 ; i++){
			sum += k[i];
			if( sum <= sum2 ){
				printf("%d\n", i);
				break;
			}
		}
	}
        return 0;
}

C++: #include<stdio.h>
#include <algorithm>
#include <cassert>
#include <cctype>
#include <climits>
#include <cmath>
#include <complex>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <iostream>
#include <iterator>
#include <list>
#include <map>     
#include <numeric>
#include <queue>
#include <set>
#include <sstream>
#include <iomanip>
#include <stack>
#include <string>
#include <vector>
using namespace std;
#define ll long long
#define ld long double
#define rep(a,t) for(int a=0;a<t;a++) 
#define forever while(true)
#define Sort(a) sort(a.begin(),a.end())
#define Reverse(a) reverse(a.begin(),a.end())
#define pb push_back
int main()
{
	cin.tie(0);
	ios::sync_with_stdio(false);
	int a[10], v[2];
	while (cin >> a[0]) {
		rep(i1, 9) {
			char charsagashiteirunowisyo;
			int i = i1 + 1;
			cin >> charsagashiteirunowisyo >> a[i];
			if (i1 == 8) {
				cin >> charsagashiteirunowisyo >> v[0] >> charsagashiteirunowisyo >> v[1];
				break;
			}
		}
		int a_sum = 0;
		for (int i = 0; i < 10; i++) {
			a_sum += a[i];
		}
		int whatnuum = (int)(a_sum*v[0] / (double)(v[0] + v[1]));
	
		for (int i = 0; i < 10; i++) {
			whatnuum-=a[i];
			
			if (whatnuum <= 0) {
				cout << i+1<<endl;
				break;
			}
		
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <algorithm>
#include <math.h>
#include <vector>
#include <set>

using namespace std;
typedef long long LL;
static const double EPS = 1e-9;

#define FOR(i,k,n) for (int i=(k); i<(int)(n); ++i)
#define REP(i,n) FOR(i,0,n) 

int l[10],L[11],v[2];
int main(void){
  while(cin>>l[0]){
    getchar();
    for(int i=1; i<10; i++){
      cin >> l[i];
      getchar();
    }
    cin >> v[0];
    getchar();
    cin >> v[1];
    L[0] = 0;
    for(int i=1;i<=10; i++)
      L[i] = L[i-1] + l[i-1];
    double con = (double)v[0]/(v[0]+v[1]) * L[10];
    for(int i=0;i<10;i++){
      if(con==0) {
cout << 1 << endl;
break;
}
      if(i==9){
        cout << 10 << endl;
        break;
      }
      if(L[i] < con && con <= L[i+1]){
        cout << (i+1) << endl;
        break;
      }
    }
  }
  return 0;
}