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 <cstdio>
using namespace std;

int main(){
	int length[11] = {0};
	int v1, v2;
	while( ~scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &length[1], &length[2], &length[3], &length[4], &length[5], &length[6], &length[7], &length[8], &length[9], &length[10], &v1, &v2) ){
		for(int i=1; i<=10; i++) length[i] += length[i-1];
		double t = (double)length[10] / (v1+v2);
		for(int i=0; i<=10; i++){
			if( t*v1 <= length[i] ){
				cout << i << endl;
				break;
			}
		}
	}
}

C++: #include<stdio.h>

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

	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&m[0],&m[1],&m[2],&m[3],&m[4],&m[5],&m[6],&m[7],&m[8],&m[9],&v1,&v2)!=EOF)
	{
		int max=0;
		for(int x=0;x<10;x++)
		{
			max+=m[x];
		}

		double half;
		half=max*v1/(v1+v2);

		for(int x=0;x<10;x++)
		{
			if(half>m[x])
			{
				half-=m[x];
			}
			else if(half<=m[x])
			{
				
				printf("%d\n",(x+1));
				x=10;
			}
		}
	}
}

C++: #include <iostream>
using namespace std;
int main(void) {
  int i, l[10], acc[10];
  double v1, v2, pos;
  char c;
  while (cin >> l[0] && l[0]) {
    for (i = 1; i < 10; i++)
      cin >> c >> l[i];
    cin >> c >> v1 >> c >> v2;
    acc[0] = l[0];
    for (i = 1; i < 10; i++)
      acc[i] = acc[i - 1] + l[i];
    pos = v1 / (v1 + v2) * acc[9];
    for (i = 1; i <= 10; i++)
      if (pos <= acc[i - 1]) {
        cout << i << endl;
        break;
      }
  }
}

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

int l[10],v,v2;

int main(){
	while(true){
		for(int i=0;i<10;i++){
			if(scanf("%d,",&l[i])==EOF)return 0;
		}
		if(scanf("%d,%d",&v,&v2)==EOF)return 0;

		double k=(double)std::accumulate(l,l+10,0)/(v+v2)*v;

		int sum=0;
		for(int i=0;i<10;i++){
			sum+=l[i];
			if(sum>=k){
				std::cout<<i+1<<std::endl;
				break;
			}
		}
	}

	return 0;
}

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

#define SIZE 10
#define scanf scanf_s

int main() {
	int l[SIZE] = { 0 }, v1, v2;
	double s;
	char t;
	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 < SIZE; i++) {
			s += l[i];
		}
		s = s * v1 / (v1 + v2);

		for (int i = 0; i < 10; i++) {
			s -= l[i];
			if (s <= 0) {
				printf("%d\n", i + 1);
				break;
			}
		}
	}
	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)){
			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<iostream>
#include<cstdio>
#include<cstring>
#include<algorithm>
#include<string>
using namespace std;
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 h;
    double k;
    int res;
    for(int i=0;i<10;i++){
      int j;
      k=0;
      for(j=0;j<=i;j++){
	k+=(double)l[j];
      }
      h=k/(double)v[0];
      k=h*v[1];
      double tk=0;
      for(j=9;j>=0;j--){
	tk+=(double)l[j];
	if(tk >= k) break;
      }
      //printf("%lf %lf   %d : %d\n",h,k,i,j);
      if(i > j){
	double th;
	tk=0;
	for(j=9;j>=i;j--){
	  tk+=(double)l[j];
	}
	k=0;
	for(j=0;j<i;j++)
	  k+=(double)l[j];
	h=k/(double)v[0];
	th=tk/(double)v[1];
	//	printf("%lf->%lf <> %lf->%lf : %d\n",k,h,tk,th,i);
	if(th > h) res=i+1;
	else
	  res=i;
	break;
      }
    }
    printf("%d\n",res);
  }
}

C++: #include <vector>
#include <list>
#include <map>
#include <set>
#include <deque>
#include <stack>
#include <bitset>
#include <algorithm>
#include <functional>
#include <numeric>
#include <utility>
#include <sstream>
#include <fstream>
#include <iostream>
#include <iomanip>
#include <cstdio>
#include <cmath>
#include <cstdlib>
#include <cctype>
#include <string>
#include <cstring>
#include <ctime>

using namespace std;

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

C++: #define _CRT_SECURE_NO_WARNINGS
#include "bits/stdc++.h"
using namespace std;
#define rep(i, n) for(int i=0; i<(n); ++i)
#define FOR(i, m, n) for(int i=(m); i<(n); ++i)
#define sz(x) ((int)(x).size())
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define Cout(x) cout << (x) << endl
#define dump(x) cerr << #x << " = " << (x) << endl;
typedef long long LL;
typedef vector<int> VI;
typedef vector<long long> VL;
typedef vector<string> VS;
typedef vector<vector<int>> VVI;
typedef pair<int, int> PII;
const int inf = (int)1e9;
const long long mod = (long long)1e9 + 7;
const double pi = acos(-1.0);
//文字列分割
vector<int> split(string str, char del) {
	vector<int> re; string sub;
	for (char c : str) {
		if (c == del) re.push_back(stoi(sub)), sub.clear();
		else sub += c;
	}
	re.push_back(stoi(sub));
	return re;
}

int main() {
	string S;
	while (cin >> S) {
		VI vec = split(S, ',');
		VI l(10); rep(i, 10)l[i] = vec[i];
		VI v(2); rep(i, 2)v[i] = vec[i + 10];

		int sum = accumulate(all(l), 0);
		double a = (double)sum / (v[0] + v[1]) * v[0];
		int ans = 0;
		rep(i, 10) {
			if (a <= l[i]) { ans = i + 1; break; }
			a -= l[i];
		}
		Cout(ans);
	}
}

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

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

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

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

	}
	return 0;
}