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 "bits/stdc++.h"
using namespace std;
using LL = long long;
using ULL = unsigned long long;
const double PI = acos(-1);
template<class T>constexpr T INF() { return ::std::numeric_limits<T>::max(); }
template<class T>constexpr T HINF() { return INF<T>() / 2; }
template <typename T_char>T_char TL(T_char cX) { return tolower(cX); };
template <typename T_char>T_char TU(T_char cX) { return toupper(cX); };
typedef pair<LL, LL> pii;
const int vy[] = { -1, -1, -1, 0, 1, 1, 1, 0 }, vx[] = { -1, 0, 1, 1, 1, 0, -1, -1 };
const int dx[4] = { 0,1,0,-1 }, dy[4] = { 1,0,-1,0 };
int popcnt(unsigned long long n) { int cnt = 0; for (int i = 0; i < 64; i++)if ((n >> i) & 1)cnt++; return cnt; }
int d_sum(LL n) { int ret = 0; while (n > 0) { ret += n % 10; n /= 10; }return ret; }
int d_cnt(LL n) { int ret = 0; while (n > 0) { ret++; n /= 10; }return ret; }
LL gcd(LL a, LL b) { if (b == 0)return a; return gcd(b, a%b); };
LL lcm(LL a, LL b) { LL g = gcd(a, b); return a / g*b; };
# define ALL(qpqpq)           (qpqpq).begin(),(qpqpq).end()
# define UNIQUE(wpwpw)        sort(ALL((wpwpw)));(wpwpw).erase(unique(ALL((wpwpw))),(wpwpw).end())
# define LOWER(epepe)         transform(ALL((epepe)),(epepe).begin(),TL<char>)
# define UPPER(rprpr)         transform(ALL((rprpr)),(rprpr).begin(),TU<char>)
# define FOR(i,tptpt,ypypy)   for(LL i=(tptpt);i<(ypypy);i++)
# define REP(i,upupu)         FOR(i,0,upupu)
# define INIT                 std::ios::sync_with_stdio(false);std::cin.tie(0)

double l[11];
double v1, v2;
char c;

int main(){
    INIT;
    while(cin >> l[0]){
        double sum = 0.0;
        sum += l[0];
        cin >> c;
        for(int i = 1;i < 10; i++){
            cin >> l[i];
            cin >> c;
            sum += l[i];
        }
        cin >> v1 >> c >> v2;
        sum /= (v1 + v2);
        sum *= v1;
        double rui = 0;
        for(int i = 1;i <= 10; i++){
            rui += l[i - 1];
            if(sum <= rui){
                cout << i << endl;
                break;
            }
        }
    }
}

C++: #include <algorithm>
#include <cstdio>
#include <iostream>
#include <map>
#include <cmath>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <bitset>
using namespace std;

#define pb         push_back
#define mp         make_pair
#define ll         long long
#define PI         acos(-1.0)
#define ALL(A)     ((A).begin(), (A).end())
#define vsort(v)   sort(v.begin(),v.end())
#define FOR(I,A,B) for(int I = (A); I < (B); ++I)

int main(){
    double v1, v2, l[10];
    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){

        double p[11];
        p[0] = 0;
        FOR(i, 1, 11){
            p[i] = p[i-1] + l[i-1];
        }
        FOR(i, 0, 10){
            double vt = (p[10] * v1) / (v1 + v2);
            if(p[i] < vt && p[i+1] >= vt){
                cout << i+1 << endl;
                break;
            }
        }
    }
}

C++: #include <iostream>
#include <sstream>
#include <string>
#include <vector>
#include <deque>
#include <stack>
#include <queue>
#include <set>
#include <map>
#include <bitset>
#include <algorithm>
#include <numeric>
#include <complex>
#include <functional>
#include <utility>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <cmath>
#include <climits>
#include <cctype>
 
using namespace std;
 
#define dump(n) cout<<"# "<<#n<<"="<<(n)<<endl
#define debug(n) cout<<__FILE__<<","<<__LINE__<<": #"<<#n<<"="<<(n)<<endl
#define repi(i,a,b) for(int i=int(a);i<int(b);i++)
#define rep(i,n) repi(i,0,n)
#define iter(c) __typeof((c).begin())
#define tr(c,i) for(iter(c) i=(c).begin();i!=(c).end();i++)
#define allof(c) (c).begin(),(c).end()
#define mp make_pair
 
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vvi;
typedef vector<string> vs;
typedef pair<int,int> pii;
 
int solve(int a[],int v[])
{
    int sum=accumulate(a,a+10,0);
    int s=0;
    rep(i,10){
        s+=a[i];
        if(v[1]*s>=v[0]*(sum-s))
            return i+1;
    }
    return 10;
}
 
int main()
{
    for(int a[10],v[2];cin>>a[0];){
        repi(i,1,10)
            scanf(",%d",a+i);
        rep(i,2)
            scanf(",%d",v+i);
        cout<<solve(a,v)<<endl;
    }
     
    return 0;
}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  long long l[10],v1,v2,len,point,now;
  char s[11];
  while(scanf("%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld%c%lld",&l[0],&s[0],&l[1],&s[1],&l[2],&s[2],&l[3],&s[3],&l[4],&s[4],&l[5],&s[5],&l[6],&s[6],&l[7],&s[7],&l[8],&s[8],&l[9],&s[9],&v1,&s[10],&v2)){
    len=0;
    for(int i=0;i<10;i++){
      len+=l[i];
    }
    point=(v1*len)/(v1+v2)+((v1*len)%(v1+v2)>0);
    now=0;
    for(int i=0;i<10;i++){
      now+=l[i];
      if(now>=point){
        cout << i+1 << endl;
        break;
      }
    }
  }
  return 0;
}

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

#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin(), v.end()
#define MSG(a) cout << #a << " " << a << endl;
#define REP(i, x, n) for (int i = x; i < n; i++)
#define OP(m) cout << m << endl
typedef long long ll;
typedef unsigned long long ull;

int main()
{
    while (1)
    {
        double dis;
        double a[10];
        char c;
        rep(i, 10)
        {
            cin >> a[i] >> c;
        }
        if (cin.eof())
            break;

        double s[11] = {};
        rep(i, 10) s[i + 1] = s[i] + a[i];

        dis = s[10];

        double v1, v2;
        cin >> v1 >> c >> v2;
        double x = v1 * dis / (v1 + v2);

        for (int i = 1; i <= 10; i++)
        {
            if (x <= s[i])
            {
                OP(i);
                break;
            }
        }
    }

    return 0;
}

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

int main()
{
    while (true) {
        int l[10], v[2];
        char comma;
        for (int i = 0; i < 10; ++i) std::cin >> l[i] >> comma;
        std::cin >> v[0] >> comma >> v[1];
        if (std::cin.eof()) break;

        int ls = 0;
        for (int i = 0; i < 10; ++i) ls += l[i];
        double t = (double)ls / (v[0] + v[1]);
        double d = t * v[0];
        for (int i = 1; i <= 10; ++i) {
            d -= l[i - 1];
            if (d <= 0) {
                std::cout << i << std::endl;
                break;
            }
        }
    }
}

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


int main(){
	int km[10],v1,v2; char a;
	double length; double leng ;
	while(1){
	for(int i=0;i<10;i++)
	cin >> km[i] >> a;
	cin >> v1 >> a >> v2;
	
	leng = 0;
	for(int k =0;k<10;k++)
	leng = leng + km[k];
	
	length = v1 * (leng / (v1 + v2));
	leng =0;
	for(int k=0;k<10;k++){
	leng = leng + km[k];
	if(leng >= length){
	cout << k +1<<endl; break;
	}
	}
	
	if(cin.eof() ) break;
	
	
	}
}