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 <cstdio>

using namespace std;

double l[10],v1, v2;

int main()
{
    loop:
    while ( scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf\n", &l[0], &l[1], &l[2], &l[3], &l[4], &l[5], &l[6], &l[7], &l[8], &l[9], &v1, &v2 ) != EOF )
    {
        v2 += v1;
        for( int i = 0; i < 10; i++ )
        {
            l[i] += ( ( i == 0 ) ? 0 : l[i - 1] );
        }
        double t = l[9] / v2;
        double dis = v1 * t;
        for( int i = 0; i < 10; i++ )
        {
            if( dis == l[i] )
            {
                printf( "%d\n", i + 1 );
                goto loop;
            }
            else if( dis < l[i] )
            {
                printf( "%d\n", i + 1 );
                goto loop;
            }
        }
        /* for( int i = 0; i < 10; i++ )
        {
            if( l[i] <= dis && dis <= l[i + 1] )
            {
                printf( "%d\n", i + 2 );
                return 0;
            }
        } */
    }
    return 0;
}

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

int main() {
	int l[10],v1,v2;
	int len;
	float len1,len2;
	
	
	while(len=0,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)+1){
		for(int i=0;i<10;++i)len+=l[i];
		
		len1 = v1 * ((float)len/(float)(v1+v2));
		
		len2=0;
		for(int i=0;i<9;++i){
			if(len1 >= len2 && len1 <=len2+l[i]){
				cout<<i+1<<endl;
				break;
			}
			len2+=l[i];
		}
		
	}
	
	return 0;
}

C++: // 2011/07/02 Tazoe

#include <iostream>
#include <string>
#include <sstream>
using namespace std;

int main()
{
	while(true){
		string str;
		cin >> str;
		if(cin.eof())
			break;

		for(int i=0; i<str.size(); i++)
			if(str[i]==',')
				str[i] = ' ';

		istringstream ist(str);
		int l[11], v1, v2;
		int tot = 0;
		for(int i=1; i<=10; i++){
			ist >> l[i];
			tot += l[i];
		}
		ist >> v1 >> v2;

		int pas = tot*v1;
		int sum = 0;
		for(int i=1; i<=10; i++){
			sum += l[i];
			if(sum*(v1+v2)>=pas){
				cout << i << endl;
				break;
			}
		}
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#define eps 10e-9
using namespace std;
int main()
{
	int data[10],sum=0;
	int v1,v2;
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&data[0],&data[1],&data[2],&data[3],&data[4],&data[5],&data[6],&data[7],&data[8],&data[9],&v1,&v2)!=EOF)
	{
		sum=data[0];
		for(int i = 1; i < 10; ++i)
		{
			sum+=data[i];
			data[i]=sum;
		}
		//cout<<"sum="<<data[9]<<endl;
		double t=data[9]/(double)(v1+v2);
		//printf("t=%.9lf\n",t);
		for(int i = 0; i < 10; ++i)
		{
			if(v1*t<(double)data[i]+eps)
			{
				cout<<i+1<<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];
		int p=x*1000;
		p = x/1000;
		for(int j=1;j<10;j++){
			if(sum>=x){
				cout<<j<<endl;
				break;
			}
			sum += l[j];
		}
	}
	return 0;
}

C++: #include <iostream>

using namespace std;

int main(void){
	while(true){
		int line[10];
		char tmp;
		cin >> line[0] >> tmp;
		if(cin.eof())
			break;
		for(int i=1;i<10;i++)
			cin >> line[i] >> tmp,line[i]+=line[i-1];
		double v1,v2;
		cin >> v1 >> tmp >> v2;
		double t=line[9]/(v1+v2);
		double tar=v1*t;
		int i;
		for( i=0;i<10;i++)
			if(tar<=line[i])
				 break;
		cout << i+1 << endl;
	}
	return 0;
}

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

int main() {
	int l[10],v1,v2;
	int len;
	float len1,len2;
	
	
	while(len=0,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)+1){
		for(int i=0;i<10;++i)len+=l[i];
		
		len1 = v1 * ((float)len/(float)(v1+v2));
		
		len2=0;
		for(int i=0;i<9;++i){
			if(len1 >= len2 && len1 <=len2+l[i]+0.001f){
				cout<<i+1<<endl;
				break;
			}
			len2+=l[i];
		}
		
	}
	
	return 0;
}

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

int main() {
	int l[10],v1,v2;
	int len;
	float len1,len2;
	
	
	while(len=0,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)+1){
		for(int i=0;i<10;++i)len+=l[i];
		
		len1=0;
		len2=len;
		
		while(fabs(len1 - len2) > 1.0 ){
			len1 += 0.01f * v1;
			len2 -= 0.01f * v2;
		}
		
		len2=0;
		for(int i=0;i<9;++i){
			if(len1 >= len2 && len1 <len2+l[i]){
				cout<<i+1<<endl;
				break;
			}
			len2+=l[i];
		}
		
	}
	
	return 0;
}

C++: #include <iostream>
#include <cstdio>
using namespace std;
int main(){
  int l[111];
  int a,b;
  int i;
  double test=0;
  double ans=0,ans1=0;
  for(i=0;i<10;i++){
    scanf("%d,",&l[i]);
    ans+=l[i];
  }
  scanf("%d,%d",&a,&b);
  ans1=a+b;
  ans=ans/ans1;
  ans=ans*a;
  for(i=0;i<10;i++){
    test+=l[i];
    if(test>=ans)break;
  }
  i++;
  cout << i << endl;
}

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

int main(){
    int dis[10];
    char c;
    int v1,v2;
    while(cin>>dis[0]){
        int m=100000;
        for(int i=1;i<10;i++)
            cin>>c>>dis[i];
        int to=0;
        for(int i=0;i<10;i++){
            to+=dis[i];
            m=min(m,dis[i]);
        }
        cin>>c>>v1>>c>>v2;
        double ma=max(v1,v2);
        double x=m/ma;
        x=x/2;
        double tot=0;
        for(double i=0;i<1.0*to/(v2+v1)+1;i+=x){
            tot+=(v1+v2)*x;
            if(tot>=to){
                i=tot/(v1+v2);
                double cam=v1*i;
                for(int i=0;i<10;i++){
                    if(cam<=dis[i]){
                        cout<<i+1<<endl;
                        goto next;
                    }
                    dis[i+1]+=dis[i];
                }
            }
        }
    next:;
    }
    return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

int main(void) {

  vector<int> l(10);
  vector<int> v(2);
  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], &v[0], &v[1])!= EOF ){
    int sum = accumulate(l.begin(), l.end(), 0);
    // cerr << sum << " ";
    double tmp = sum * v[0] * 1.0 / (v[0]+v[1]);
    // cerr << tmp << endl;
    for(int i=1; i<10; i++) l[i] += l[i-1];
    // int a = 0;
    for(int i=1; i<10; i++){
      if( l[i-1] == tmp ){
        cout << i << endl;
        break;
      }else if( l[i-1] < tmp && tmp < l[i] ){
        // cerr << l[i-1] << " " << l[i] << endl;
        cout << i+1 << endl;
        // break;
      }
    }
  }



  return 0;
}

// EOF

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

typedef double dbl;
int main() {
	int l[10], v1, v2;
	while (cin >> l[0]) {
		int s = l[0];
		char c;
		for (int i = 1; i < 10; i++) {
			cin >> c >> l[i];
			s += l[i];
		}
		cin >> c >> v1 >> c >> v2;
		dbl t = (dbl)s / (v1 + v2);
		dbl sum = 0.0;
		int p = 0;
		while (sum < v1 * t) {
			sum += (dbl)l[p++];
		}
		cout << p << endl;
	}
}