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++: #define _USE_MATH_DEFINES
#include<iostream>
#include<vector>
#include<algorithm>
#include<string>
#include<cmath>
#include<list>
#include<stack>
#include<queue>
#include<cctype>
#include<iomanip>
#include<functional>
#include<numeric>
#include<map>
#include<set>
#define EPS 1e-10
using namespace std;
typedef long long llong;
int main() {
	vector<int>l(10), v(2);
	char c;
	while (cin >> l[0]) {
		for (int i = 1; i < 10; i++)cin >> c >> l[i];
		cin >> c >> v[0] >> c >> v[1];
		int sum = accumulate(l.begin(), l.end(), 0);
		//cout << "sum = " << sum;
		int V = v[0] + v[1];
		// cout << "  V = " << V << "  ";
		double x = (double)v[0] * sum / (double)V;
		//cout << "x = " << x << " ";
		int z = 0;
		for (int i = 0; i < 10; i++) {
			z += l[i];
			if (z >= x) {
				cout << i + 1 << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #define _USE_MATH_DEFINES
#define _CRT_SECURE_NO_WARNINGS

#include <iostream>
#include <string>
#include <sstream>
#include <iomanip>
#include <cmath>
#include <algorithm>
#include <utility>
#include <vector>
#include <numeric>

using namespace std;

int main()
{
	string s;
	for (; getline(cin, s); )
	{
		stringstream ss;
		ss << s;

		vector<int> l(10);
		int v0, v1;

		for (int i = 0; i < 10; i++)
		{
			ss >> l.at(i);
			ss.ignore();

			l.at(i) *= 1000;
		}

		int d0 = 0;
		int d1 = accumulate(l.begin(), l.end(), 0);

		ss >> v0;
		ss.ignore();

		ss >> v1;

		for (; d0 < d1;)
		{
			d0 += v0;
			d1 -= v1;
		}

		int ll = 0;
		int x = 0;
		for (int i = 0; i < 10; i++)
		{
			ll += l.at(i);
			if (ll >= d0)
			{
				x = i + 1;
				break;
			}
		}

		cout << x << endl;
	}
}

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

int main() {
  int l[10];
  int v[2];
  int s[11];
  int r;
  double x;

  while (1) {
    for (int i=0; i<10; i++) {
      scanf("%d,", &l[i]);
    }
    r = scanf("%d,%d", &v[0], &v[1]);
    if (r == EOF) break;

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

  return 0;
}

C++: #include<iostream>
#include<stdio.h>
#include<math.h>

int main()
{
	int l[10], 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 = 0;
		for( int i = 0; i < 10; i++ ) sum += l[i];
		
		int p = ceil( (double)sum * v[0] / ( v[0] + v[1] ) );
		
		int i = 0, j = 0;
		while( j < p ){
		 	j += l[i++];
		}
		
		std::cout << i << std::endl;
	}

 	return 0;
}

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

int l[10];
int v1, v2;

void solve(void)
{
    int s = 0;
    int i;
    for (i = 0; i < 10; i++) s += l[i];
    double meet_point = (double)s / (double)(v1 + v2) * v1;
    int v1_run = 0;
    i = 0;
    while (v1_run < meet_point) {
        v1_run += l[i++];
    }
    cout << i << endl;
}

int main(void)
{
    char c;
    while (cin >> l[0] >> c >> 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 >>  v1  >> c >> v2) {
        solve();
    }
    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);
        double inter=1.0*sum*v1/(v1+v2);
        int sub=0;
        int i=0;
        while(sub<inter)sub+=l[i++];
        cout<<i<<endl;
    }
}

C++: #include <stdio.h>
  
int main(){
double v1,v2,t,x;
int a[10],i;
while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%lf,%lf",&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],&a[7],&a[8],&a[9],&v1,&v2)!=EOF){
x=0;
for(i=0;i<10;i++){
x+=a[i];
}
t=(double)x/((double)v1+(double)v2)*(double)v1;
for(i=0;t>=0;i++){
t-=(double)a[i];
}
printf("%d\n",i+1);
}
return 0;
}

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

int main(){
    int L;
    int l[10];
    int v1, v2;
    int st, la;
    double pass;
    double time;
    char comma;
    while(cin >> l[0]){
        for(int i=1;i<10;i++){
            cin >> comma >> L;
            l[i] = L + l[i-1];
        }
        cin >> comma >> v1 >> comma >> v2;
        cout << v1 << " " << v2 << endl;
        time = l[9] / (double)(v1+v2);
        pass = time * v1;
        for(int i=0;i<10;i++){
            if(pass <= l[i]){
                cout << i+1 << endl;
                break;
            }
        }
    }
}

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

int main(void)
{
	double a[10] = {};
	double len2, len1;
	double v1, v2;

	while(scanf("%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf,%lf",
		&a[0], &a[1], &a[2], &a[3], &a[4], &a[5], &a[6], &a[7], &a[8], &a[9], &v1, &v2) != EOF)
	{
		int len = 0;
		int i;
		int distance;
		len2 = 0;
		len1 = 0;
		int count = 0;
		for (int i = 0; i < 10; i++) len2 += a[i];
		v1 /= 60; v2 /= 60;
		while (len2 >= len1)
		{
			len2 -= v2;
			len1 += v1;
			count++;
		}
		distance = len1 - fabs(len1 - len2);
		//cout << "distance =" << distance << endl;
		for (i = 0; i < 10; i++)
		{
			len += a[i];
		//	cout << "len = " << len << endl;
			if (i == 0)
			{
				if (len > distance && 0 <= distance)
				{
					i++;
					break;
				}
			}
		else if(len - a[i] <= distance && distance < len)
			{
				i++;
				break;
			}
		}
		cout << i << endl;
	}
	return 0;
}

C++: #include <bits/stdc++.h>

using namespace std;

vector<string> split(const string &str, char delim = ' ') {
  stringstream ss(str);
  vector<string> res;
  for (string tmp; getline(ss, tmp, delim);) res.push_back(tmp);
  return res;
}

template<typename T = long long> inline T toInteger(const string&);

template<> inline int toInteger<int>(const string& s) {
  return stoi(s);
}

template<> inline long toInteger<long>(const string& s) {
  return stol(s);
}

template<> inline long long toInteger<long long>(const string& s) {
  return stoll(s);
}

template<typename T = long long> inline T toInteger(const string& s, int n) {
  T res = 0;
  for (char c : s) {
    if (isdigit(c)) res = res * n + c - '0';
    else if (isalpha(c)) res = res * n + tolower(c) - 'a' + 10;
  }
  return s[0] == '-' ? -res : res;
}

int main() {
  string line;
  while (cin >> line) {
    auto d = split(line, ',');
    vector<int> l(10), v(2), s(10);
    for (int i = 0; i < 10; ++i) l[i] = toInteger<int>(d[i]);
    for (int i = 0; i < 2; ++i) v[i] = toInteger<int>(d[i + 10]);
    partial_sum(l.begin(), l.end(), s.begin());
    for (int i = 0; i < 10; ++i) {
      if (s[i] * v[1] >= (s.back() - s[i]) * v[0]) {
        cout << i + 1 << endl;
        break;
      }
    }
  }
}