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<string>
#include<cstdio>
#include<cstring>
#include<algorithm>
using namespace std;
int main(void){
 
    int l[15];
    int i,a,b;
 
    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],&a,&b)!=EOF){
 
        double sum=0;
        for(i=0;i<10;i++){
            sum+=(double)l[i];
        }
 
    double c=0,d=0;
    for(i=0;i<10;i++){
        c+=l[i];
        d+=(double)l[i]/a*b;
        if(c+d>=sum)break;
    }
    cout<<i+1<<endl;
 
    }
    return 0;
}

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

int main()
{
	int l[10], v[2];
	char d;
	while (cin >> l[0] >> d >> l[1] >> d >> l[2] >> d >> l[3] >> d >> l[4] >> d >> l[5] >> d >> l[6] >> d >> l[7] >> d >> l[8] >> d >> l[9] >> d >> v[0] >> d >> v[1]){
		double L = 0, V = v[0] + v[1],a = 0;
		for (int i = 0; i < 10; ++i){
			L += l[i];
		}

		a = L * v[0] / V;
		
		for (int i = 0; i < 10; ++i){
			a -= l[i];
			if (a <= 0){
				cout << i+1 << endl;
				break;
			}
		}

	}
	return 0;
}

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

using namespace std;

int main(){
  int i;
  long double closs, l[11], v[2], sum_len = 0.0,t[2][12]={};
  while(scanf("%Lf,",&l[1])!=EOF){
    sum_len=l[1];
    for(i=2;i<11;i++) {scanf("%Lf,",&l[i]);sum_len+=l[i];}
    scanf("%Lf,%Lf",&v[0],&v[1]);
    closs=sum_len/(v[0]+v[1]);
   long double sum_time[2]={};
    for(i=1;i<11;i++){
      t[0][i]=sum_time[0]+(l[i]/v[0]);
      t[1][11-i]=sum_time[1]+l[11-i]/v[1];
      sum_time[0]+=l[i]/v[0];
      sum_time[1]+=l[12-i]/v[1];
    }
    for(i=0;i<12;i++){
      t[0][i] = t[0][i]; t[1][i]=t[1][i];
      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 <algorithm>
#include <functional>
#include <cmath>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <string>
#include <sstream>
#include <iostream>
#include <iomanip>
#include <vector>
#include <list>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <bitset>
#include <climits>

#define all(c) (c).begin(), (c).end()
#define rep(i,n) for(int i=0;i<(n);i++)
#define pb(e) push_back(e)
#define mp(a, b) make_pair(a, b)
#define fr first
#define sc second

const int INF=100000000;
int dx[4]={1,0,-1,0};
int dy[4]={0,1,0,-1};
using namespace std;
typedef pair<int ,int > P;
typedef long long ll;

int l[10];
int v1,v2;
void solve() {

    int sum=0;
    rep(i,10) sum+=l[i];
    int v=v1+v2;
    double a = 1.0*sum/v;
    double b = a*v1;
    // cout<<b<<endl;
    rep(i,10) {
        if(b<=l[i]) {
            cout<<i+1<<endl;
            return;
        }
        b-=l[i];
    }
}
int main() {
    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)) {

        solve();


    }
    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=0;
		len2=len;
		
		while(fabs(len1 - len2) > 0.2 ){
			len1 += 0.01f * v1;
			len2 -= 0.01f * v2;
			if(len1>=len2)break;
		}
		
		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 <string>
#include <map>
#include <vector>
#include <algorithm>
#include <stdio.h>
#include <math.h>
#include <iomanip>
#include <stack>
#include <sstream>
int main(){
  using std::cout;
  using std::endl;
  double l[10]={0},v1,v2,sdis,adis,dis;
  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],&v1,&v2)!=EOF){
    v1=v2=dis=sdis=adis=0;
    for(int i=0;i<10;i++){
      adis+=l[i];
    }
    dis=v1*adis/(v1+v2);
    for(int j=0;j<10;j++){
      sdis+=l[j];
      if(dis<=sdis){cout<<j+1<<endl;break;}
    }
  }
  return 0;
}

C++: #include <iostream>
#include <algorithm>
#include <cctype>
#include <cstdio>
#include <math.h>
using namespace std;

int main(){
	int l[10],v1,v2,s;
	double c;
	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){
		s=0;
		for(int i=0;i<10;i++)s+=l[i];
		c=(double)s/(v1+v2)*v1;
		for(int i=0;i<10;i++){
			c-=l[i];
			if(c<=0){cout<<i+1<<endl;break;}
		}
	}
}