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>
#include<cmath>
#include<cstring>
#include<iostream>
#include<algorithm>
//djzofhf;eo //DJ ???????????§???
using namespace std;
int main(){
    double a[11]={0};
    double v[2];
    while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&a[10],&v[0],&v[1])!=EOF){
        double rui[11]={0};
        for(int i=1;i<=10;i++)rui[i]=rui[i-1]+a[i];
        double suredis=rui[10]*(v[0]/(v[0]+v[1]));
        for(int i=1;;i++){
            if(suredis-0.000001<rui[i]){
                cout<<i<<endl;
                break;
            }
        }

    }
    return 0;
}

C++: #include<iostream>
using namespace std;
int main(){
char c;
int i[10],v1,v2,k;
double d1,d2,dd;
while(cin>>i[0]){
for(k=1;k<10;k++)cin>>c>>i[k];
cin>>c>>v1>>c>>v2;
d2=0,dd=0;
for(k=0;k<10;k++)dd+=i[k];
d1=dd/(v1+v2)*v1;
for(k=0;k<10;k++){
d2+=i[k];
if(d2>=d1)break;
}
cout<<k+1<<endl;
}
return 0;
}

C++: #include <iostream>
#include <cstdio>
#define  rep(i,n) for(int i = 0 ; i < n ; i++ )
using namespace std;

int main(){
  double v1,v2;
  int l[10];
  while(~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%lf,%lf",&l[0],&l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&v1,&v2)){
  double sum = 0;
  rep(i,10){
    sum += l[i];
  }
  double sum2 = 0;
  v1=(v1/(v1+v2))*sum;
  rep(i,10){
    sum2+=l[i];
    if(v1 < sum2){
      cout << i << endl;
      break;
    }
  }
  }
  return 0;
}

C++: 
#include<iostream>
using namespace std;
int main(){
		
	int km[10],v1,v2; char a;
    double leng;
	while(1){
	   for(int i = 0; i < 10; i++)
        		cin >> km[i] >> a;
        
        if(!cin)    break;
        cin >> v1 >> a >> v2;
 
	leng = 0.0;
	for(int k =0;k<10;k++)
	leng += km[k]; 
	double length = leng * v1 / (v1 +v2); 
	leng = 0.0;  
	for(int k=0;k<10;k++){
	leng +=  km[k];
	if(leng >= length ){
	
	cout << k+1 <<endl; break;
	}
	}	
	}
}

C++: #include<stdio.h>
int x;
int d[11];
int i,j;
int main(){
	while(scanf("%d,",&x)!=EOF){
		d[0]=0;
		d[1]=d[0]+x;
		for(i=0;i<9;i++){
			scanf("%d,",&x);
			d[i+2]=d[i+1]+x;
		}
		int v1,v2;
		scanf("%d,%d",&v1,&v2);
		double p;
		int ans;
		p=(double)(d[10]*v1)/(v1+v2);
		for(i=0;i<10;i++){
			if(p>d[i]&&p<=d[i+1]){
				ans=i;
				break;
			}
		}
		printf("%d\n",ans+1);
	}
}

C++: #include <bits/stdc++.h>
using namespace std;
int station[10];
int v1, v2;

void solve() {
    double v = (v1 + v2);
    int sumDis = 0;
    for(int r = 0; r < 10; r++) {
        sumDis += station[r];
    }
    
    double multi = v1 * (sumDis / v); //速さ * 時間(距離/速さ) = v1で鉢合わせるまで進んだ距離
    //cout << multi << endl;
    int kukan = 0;
    for(int r = 0; r < 10; r++) {
        //cout << multi << endl;
        if(multi <= 0) break;
        multi -= station[r];
        kukan++;
    }
    cout << kukan << endl;
}

int main(void) {
    
    while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &station[0],&station[1],&station[2],&station[3],&station[4],&station[5],&station[6],&station[7],&station[8],&station[9], &v1, &v2) != EOF) {
        solve();
    }
    
    return(0);
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main()
{
	int dis[10],v1,v2;
	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){
			int sum=0;
			for(int i=0;i<10;i++)sum+=dis[i];
			double col=(double)sum*(double)v1/(double)(v1+v2);
			//cout<<"col:"<<col<<endl;
			sum=0;
			for(int i=0;i<10;i++){
				sum+=dis[i];
				if((double)sum-col>=-0.000000001){sum=i;break;}
			}
			cout<<sum+1<<endl;
	}
	return 0;
}

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

int main(){
  vector<int> l(11); int v1, v2; char c;

  while(cin>>l[1]>>c>>l[2]>>c>>l[3]>>c>>l[4]>>c>>l[5]>>c>>l[6]>>c>>l[7]>>c>>l[8]>>c>>l[9]>>c>>l[10]>>c>>v1>>c>>v2){
    vector<int> sum(11, 0);
    for(int i=1; i<=10; i++) sum[i] = sum[i-1] + l[i];

    for(int i=1; i<=10; i++){
      if(sum[i-1] * (v1+v2) < v1 * sum[10] && sum[i] * (v1+v2) >= v1 * sum[10]){
        cout << i << endl;
      }
    }
  }
}

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 <stdio.h>
int main() {
	int A[10],v1,v2,i,j;while (scanf("%d",&A[0])!=EOF) {
		j=A[0];for (i=1;i<10;scanf(",%d",&A[i]),j+=A[i++]);scanf(",%d,%d",&v1,&v2);
		double t=(j+0.0)/(v1+v2+0.0);
		double x=t*v1;
		i=j=0;while ((j+A[i]+0.0)<x) j+=A[i],i++;
		printf("%d\n",i+1);
	}
	return 0;
}

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

int main()
{
    int l[10] , v1 , v2 , n , cnt;
    double d , t;
    char ch;
    while(cin>>l[0]>>ch>>l[1]>>ch>>l[2]>>ch>>l[3]>>ch>>l[4]>>ch>>l[5]>>ch>>l[6]>>ch>>l[7]>>ch>>l[8]>>ch>>l[9]>>ch>>v1>>ch>>v2 !=EOF){
        n=0;
        for(int i=0;i<10;i++){
            n+=l[i];
        }
        t=n/(v1+v2);
        d=v1*t;    //列車1の動く距離
        cnt=0;
        while(d>0){
            d -= l[cnt];
            cnt++;
        }
        cout << cnt << endl;
    }
	return 0;
}

C++: #include<stdio.h>

int main(void)
{
	int l[10],x[2];
	int s,i;
	double t;

	while(scanf("%d",&l[0])!=EOF)
	{
		s=l[0];
		for(i=1;i<10;i++){
			scanf(",%d",&l[i]);
			s+=l[i];
		}
		scanf(",%d,%d",&x[0],&x[1]);

		t=s*x[0]/(x[0]+x[1]);
		for(i=0;i<10;i++){
			t-=l[i];
			if(t<=0){
				printf("%d\n",i+1);
				break;
			}
		}

	}
	return 0;
}

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

int main()
{
	int len[10];
	int v1,v2;
	while( scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &len[0],&len[1],&len[2],&len[3],&len[4],&len[5],&len[6],&len[7],&len[8],&len[9],&v1,&v2) != EOF ){
		int accum[10] = {0};
		accum[0] = len[0];
		for(int i=1;i<10;i++){
			accum[i] += accum[i-1] + len[i];
		}
		
		// accum[9] は合計の距離
		double t = (double)accum[9]/(v1 + v2);
		double dist = (double) v1*t;
		for(int i=0;i<10;i++){
			if( dist <= accum[i] ){
				cout<<i+1<<endl;
				break;
			}
		}
	}
	return 0;
}

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

int main()
{
    int l[10] , v1 , v2 , n , m;
    double d , t;
    while(1){
        for(int i=0;i<10;i++){
            cin >> l[i];
        }
        cin >> v1 >> v2;
        t=n/(v1+v2);
        d=v1*t;    //列車1の動く距離
        m=0;
        for(int i=0;i<10;i++){
            m+=l[i];
            if(m<d){
                cout << i << endl;
                break;
            }
        }
    }
	return 0;
}

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

int main(void) {
    double a[10], v1, v2;
    char c;
    while (cin >> a[0]) {
        for (int i= 1; i < 10; ++i)
            cin >> c >> a[i];
        cin >> c >> v1 >> c >> v2;

        double t = 0.0;
        for (int i = 0; i < 10; ++i)
            t += a[i] / (v1 + v2);

        double t2 = 0.0;
        for (int i = 0; i < 10; ++i) {
            t2 += a[i] / v1;
            if (t2 >= t) {
                cout << i+1 << endl;
                break;
            }
        }
    }
    return 0;
}