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 <iomanip>
#include <cassert>
#include <algorithm>
#include <functional>
#include <vector>
#include <string>
#include <cstring>
#include <stack>
#include <queue>
#include <map>
#include <bitset>
#include <sstream>
#include <istream>
#include <cmath>
#include <cstdio>

using namespace std;

#define vci vector<int>
#define vcs vector<string>
#define pb push_back
#define sz size()
#define mapii map<int, int>
#define mapci map<char, int>
#define mapsi map<string, int>
#define all(x) x.begin(), x.end()
#define minit(a, i) memset(a, i, sizeof(a));

#define for_(i, a, b) for (int i=(int)a; i<(int)b; i++)
#define for_d(i, a, b) for (int i=(int)a-1; i>=b; i--)
#define for_r(i, a, b, c) for (int i=(int)a; i<(int)b; i += c)
#define for_dr(i, a, b, c) for (int i=(int)a-1; i>=b; i -= c)
#define FOR(i,c) for(__typeof((c).begin())i=(c).begin();i!=(c).end();++i)

typedef long long ll;

const int iINF = 2147483647;
const ll lINF = 9223372036854775807;

template <class T> inline void dbg(T t) { cout << t << endl; }



#define MAX 10

int main() {
	vci dist(MAX);
	int vi, vj; char c;
	
	while (cin >> dist[0]) {
		for_(i, 1, MAX) {
			int d;
			cin>>c>>d;
			dist[i] = dist[i-1] + d;
		}
		cin >>c>> vi>>c >> vj;
		
		double lb = 0.0, rb = (double)dist[MAX-1]/(double)max(vi,vj);
		while (rb-lb>1e-9) {
			double mb = (lb+rb)/2.;			
			double pi = (double)vi*mb, pj = (double)dist[MAX-1] - (double)vj*mb;
			
			if (pi==pj) { lb = mb; break; }
			if (pi < pj) lb = mb;
			else rb = mb;
		}
		
		double p = vi*lb;
		for_(i, 0, MAX) if (dist[i]>p) {
			cout << i+1 << endl; break;
		}
	}	
	
	return 0;
}

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

int main() {
	int l[10], v1, v2;
	while (scanf("%d,", &l[0]) == 1) {
		for (int i = 1; i < 10; i++)
			scanf("%d,", &l[i]);
		scanf("%d,%d", &v1, &v2);
		int x = 0;
		for (int i = 0; i < 10; i++) {
			x += l[i];
			l[i] *= v1+v2;
		}
		x *= v1;
		for (int i = 0; i < 10; i++) {
			x -= l[i];
			if (x <= 0) {
				cout << i+1 << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(void)
{
	int l[11];
	int v1,v2,i,n;
	double tmp,tmp2;
	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)
	{
		n=0;
		for(i=1;i<=10;i++)
		{
			n += l[i];
		}
		tmp = (double)n/(v1+v2);
		tmp2 = (double)v1*tmp;
		n = 0;
		for(i=1;i<=10;i++)
		{
			n += l[i];
			if(n>=tmp2)
			{
				printf("%d\n",i);
				break;
			}
		}
	}
	return 0;
}

C++: #include<iostream>
#include<cstdio>

using namespace std;

int main(){
  int i,sum_len,v[2];
  float closs, l[11],t[2][12]={};
  while(scanf("%f,",&l[1])!=EOF){
    sum_len=l[1];
    for(i=2;i<11;i++) {scanf("%f,",&l[i]);sum_len+=l[i];}
    scanf("%d,%d",&v[0],&v[1]);
    closs=1.0*sum_len/(v[0]+v[1]);
    double sum_time[2]={};
    for(i=1;i<10;i++){
      t[0][i]=sum_time[0]+(l[i]/v[0]);
      t[1][10-i]=sum_time[1]+l[10-i]/v[1];
      sum_time[0]+=l[i]/v[0];
      sum_time[1]+=l[10-i]/v[1];
    }
    sum_time[0]+=l[i]/v[0];
    //    sum_time[1]+=l[10-i]/v[1];
    t[0][10]=t[1][0]=sum_time[0];
    for(i=0;i<11;i++){
      //      cout<<' '<<closs<<t[0][i] << ' ' <<t[1][i]<<endl;
      if(t[0][i] >= closs && t[1][i] <= closs){cout<<i<<endl; break;}
      //if(t[0][i] == closs && t[1][i] == closs) {cout<<i-1<<endl; break;}
    }
  }
  return 0;
}

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

int main() {
	int length[10];
	int v1,v2;
	float res;
	while ( scanf("%d",&length[0] ) != -1) {
		for ( int i = 1; i < 10; i++ ) {
			scanf(",%d",&length[i] );
		}
		scanf(",%d,%d", &v1, &v2);
		
		int sum = 0;
		for ( int i = 0; i < 10; i++ )
			sum = sum + length[i];
		res = (float)sum / (1+(float)v2/v1);
		for ( int i = 0; i < 10; i++ ){
			if ( res - length[i] > 0 ) {
				res = res - length[i];
			} else {
				cout << i+1 << endl;
				break;
			}
		}
	}
}

C++: #include<iostream>
#include<cstdio>

using namespace std;

int main(int argc, char *argv[])
{
  int l[10];
  int v1,v2;
  int L;
  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){
    L =0;
  for(int i = 0;i < 10;i++){
    L += l[i];
  }
  double d;
  d =(double)L*v1/(v1+v2);
  L =0;
  for(int i = 0;i < 10;i++){
    L += l[i];
    if(d <=L){
      printf("%d\n",i+1);
      break;
    }
  }
  }
  return 0;
}

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

int main()
{
  int l[10], v1, v2;
  int len;

  while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", l, &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];
    }
    double t = (double)len / (v1 + v2);
    double d = (double)v1 * t;
    len = 0;
    for (int i = 0; i < 10; i++){
      len += l[i];
      if (d <= len){
        cout << i + 1 << endl;
        break;
      }
    }
  }
}

C++: #include <cstdio>

int main()
{
        const int MAX = 10;
        int l[MAX];
        int v1, v2;
        int sumL;

        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) {
                sumL = 0;
                for (int i: l) {
                        sumL += i;
                }
                float l1 = v1 * ((float)sumL / (v1 + v2));
                int ans = 0;
                while (l1 > 0.0) {
                        l1 -= l[ans++];
                }
                printf("%d\n", ans);
        }

        return 0;
}

C++: #include<iostream>

using namespace std;

int data[11];
int sum=0;
bool input(){
	fill(data,data+11,0);
	char c;
	int x;
	for(int i=1;i<=10;i++){
		if(!(cin>>x))return false;
		cin>>c;
		data[i]=data[i-1]+x;
	}
	return true;
}
int main(){
	while(input()){
		int v1,v2;
		char c;
		cin>>v1>>c>>v2;
		double t=1.*data[10]/(v1+v2);
		
		for(int i=1;i<=10;i++){
			if(v1*t<=data[i]){
				cout<<i<<endl;
				break;
			}
		}
	}
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main()
{
  int l[11],v1,v2;
  for(;~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);)
    {
      for(int i=1;i<10;i++)
	  l[i]+=l[i-1];
      double num;
      int ans;
      // if(v1<v2)
	num=l[9]*(v1/((double)v1+v2));
      //      else
      //	num=l[9]*(v2/((double)v1+v2));
      for(int i=0;i<10;i++)
	{
	  if(l[i]>=num)
	    {
	      //  cout<<"l="<<l[i]<<"num="<<num<<endl;
	      ans=i+1;
	      break;
	    }
	}
	cout<<ans<<endl;
      //      cout<<l[9]<<endl;
    }
}