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 <stdio.h>

int main(void)
{
	int dis[10], v1, v2;
	int i, j, sum;
	double x, cross;
	
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &dis[0], &dis[1], &dis[2], &dis[3], &dis[4], &dis[5], &dis[6], &dis[7], &dis[8], &dis[9], &v1, &v2) != EOF){
		
		sum = 0;
		for (i = 0; i < 10; i++){
			sum += dis[i];
		}
		x = (double)sum / (v1 + v2);
		cross = v1 * x;
		
		i = 0;
		while (cross > 0){
			cross -= dis[i];
			i++;
		}
		printf("%d\n", i);
	}
	
	return (0);
}

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

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

    while( cin >> l[0] >> p >> l[1] >> p >> l[2] >> p >> l[3] >> p >> l[4] >> p >> l[5] >> p >> l[6] >> p >> l[7] >> p >> l[8] >> p >> l[9] >> p >> v1 >> p >> v2 )
    {
        double distance = 0;
        double x, y, h;

        for( int i = 0; i < 10; i++ )
            distance += l[i];

        h = distance / ( v1 + v2 );
        x = v1 * h;
        
        int section = 0;
        for( int i = 0; i < 10; i++ )
        {
            section++;
            x -= l[i];
            if( x <= 0 )
                break;
        }
        cout << section << endl;
    }
    return 0;
}

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

#define N 10	// üHÌ

int main()
{
	double l[N], v[2];
	double sum[N];
	double time;
	double position;
	int i;

	while (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&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) {
		sum[0] = l[0];
		for (i = 1; i < N; i++)
			sum[i] = sum[i-1]+l[i];
		time = (double)sum[9] / (double)(v[0]+v[1]);
		position = v[0] * sum[9] / (v[0]+v[1]);
		cout<<endl;
		for (i = 0; i < N; i++)
			if (sum[i]>=position)
				break;
		i++;

		cout<<i<<endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
#include<cstring>
#include<vector>
#include<map>
#include<sstream>
#include<algorithm>
using namespace std;

int main(){
   
   int i,n,sum;
   int f1,f2;
   double a,b,p;
   
   vector<int> kyori;
   stringstream ss;
   string str;
   char s;
   
   while(getline(cin,str)){
      
      kyori.clear();
      sum=0;
      ss<<str;
   
      for(i=0;i<10;i++){
         ss>>n>>s;
         kyori.push_back(n);
      }
      ss>>f1>>s>>f2;
   
      for(i=0;i<10;i++) sum+=kyori[i];
      
      a = f1*sum; b = f1+f2;
      p = a/b;
      
      sum=kyori[0];
      for(i=1;i<10;i++){
         if(sum>=p){
            cout<<i<<endl;
            break;
         }
         else
            sum+=kyori[i];
      }
      ss.str("");
      ss.clear(stringstream::goodbit);
   }
   return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int w[10],a,b,i;
  double t,d;
  while(cin>>w[0]){
  for(i=1;i<10;i++)scanf(",%d",&w[i]);
  int sum[10]={0};
  sum[0]=w[0];
  for(i=1;i<10;i++)sum[i]+=sum[i-1]+w[i];
  scanf("%d,%d",&a,&b);
  t=(double)sum[9]/(a+b);
  d=(double)t*a;
  for(i=0;i<10;i++)if(d<=sum[i]){
    cout<<i+1<<endl;
    break;
  }
  }
}

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

int main(){
    int l[10];
    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){
        double sum = 0.0;
        int i;
        for(i=0; i<10; ++i) sum += l[i];
        double l1 = sum * v[0] / (v[0] + v[1]);
        sum = 0.0;
        for(i=0; i<10; ++i){
            sum += l[i];
            if(l1 <= sum) break;
        }
        cout << i+1 << endl;
    }
    return 0;
}

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

int main(){

	int l[10], v[2];
	double x;
	
/*	while(scanf("%d", &l[0]) != EOF){
		for(int i=1; i<10; i++){
			scanf("%d", &l[i]);
			l[i] += l[i-1];
		}
		scanf("%d, %d", &v[0], &v[1]);
*/
	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){

		for(int i=1; i<10; i++){
			l[i] += l[i-1];
		}

//		for(int i=0; i<10; i++)
//			cout << l[i] << " ";
//		cout << v[0] << " " << v[1] << endl;
		
		x = (double)l[9] * v[0] / (v[0] + v[1]);
//cout << x << " " << endl;
		for(int i=0; i<10; i++){
			if(x <= (double)l[i]){
				cout << i+1 << endl;
				break;
			}
		}
	}

	return 0;

}

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

int main(){
	int len[ 10 ], vel[ 2 ];
	char c;

	while ( cin >> len[ 0 ] >> c >> len[ 1 ] >> c >> len[ 2 ] >> c >> len[ 3 ] >> c
				>> len[ 4 ] >> c >> len[ 5 ] >> c >> len[ 6 ] >> c >> len[ 7 ] >> c
				>> len[ 8 ] >> c >> len[ 9 ] >> c >> vel[ 0 ] >> c >> vel[ 1 ] ){
		int length = 0;
		for ( int i = 0; i < 10; ++i ){
			length += len[ i ];
		}
		double location = static_cast< double >( vel[ 0 ] * length ) / static_cast< double >( vel[ 0 ] + vel[ 1 ] );
		length = 0;
		for ( int i = 0; i < 10; ++i ){
			length += len[ i ];
			if ( location <= length ){
				cout << i + 1 << endl;
				break;
			}
		}
	}


	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
	double row[10],v[2];
	for(;;){
		if (scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&row[0],&row[1],&row[2],&row[3],&row[4],&row[5],&row[6],&row[7],&row[8],&row[9],&v[0],&v[1]) == EOF){break;}
		int i;
		double t,dis = 0,d = 0;
		for(int i=0; i<10; i++){
			dis+=row[i];
		}
		for(i=0; i<10; i++){
			d+=row[i];
			t = d/v[0];
			if(dis <= t*(v[0]+v[1])){break;}
		}
		cout<<i+1<<endl;
	}
	return 0;
}

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

using namespace std;

#define rep(i,n) for(int i=0; i<n; i++)
int main(){
    int l[10];
    int v1,v2;
    while(scanf("%d,",&l[0])!=EOF){
        int sum=l[0];
        for(int i=1; i<10; i++){
            scanf("%d,",&l[i]);
            sum+=l[i];
        }
        scanf("%d,%d",&v1,&v2);
        int inter=sum*v1/(v1+v2);
        int sub=0;
        int i=0;
        while(sub<inter)sub+=l[i++];
        i++;
        if((sum*v1)%(v1+v2)==0)i--;
        cout<<i<<endl;
    }
}

C++: #include <iostream>
#include <vector>
#include <algorithm>
#include <numeric>
using namespace std;
typedef vector <int> VI;
typedef vector <double> VD;

int main( void )
{
	VD l(10); char c; double v1, v2;
	while ( cin.eof() == false )
	{
		for ( int i = 0; i < 10; i++ ) cin >> l[i] >> c;
		cin >> v1 >> c >> v2;

		if ( cin.eof() ) break;

		double length = accumulate( l.begin(), l.end(), 0.0 );
		double tc = length / ( v1 + v2 );
		double now = v1 * tc;

		int answer = -1;
		double sum = 0;
		for ( int i = 0; i < l.size(); i++ )
		{
			if ( sum <= now && now <= sum + l[i] )
			{
				answer = i+1;
				break;
			}
			sum += l[i];
		}

		cout << answer << endl;
	}
	return 0;
}

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

int main(){
	int first;
	while(std::cin>>first){
		std::vector<int> distance(10);
		distance[0]=first;
		int a=0;
		int sum=0;
		char dummy;
		sum+=first;
		for(int i=1;i<10;++i){
			std::cin>>dummy;
			int s;
			std::cin>>s;
			sum+=s;
			a+=s;
			distance[i]=a;
		}
		double v1,v2;
		std::cin>>dummy>>v1>>dummy>>v2;
		int ans=0;
		for(int i=9;i>=0;++i){
			if(distance[i]<=sum/(v1+v2)*v1){
				ans=i+1;
			}
		}
		std::cout<<ans<<std::endl;
	}
	return 0;
}