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<iomanip>
#include<algorithm>
#include<array>
#include<bitset>
#include<cassert>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<cstring>
#include<functional>
#include<limits>
#include<list>
#include<map>
#include<numeric>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<queue>
#include<vector>
using namespace std;

using ll = long long;
using ull = unsigned long long;
using pii = pair<int, int>;

#define FOR(i,a,b) for(int i=(a);i<(b);i++)
#define RFOR(i,a,b) for(int i=(b)-1;i>=(a);i--)
#define REP(i,n) for(int i=0;i<(n);i++)
#define RREP(i,n) for(int i=(n)-1;i>=0;i--)
#define ALL(a) (a).begin(),(a).end()
#define DUMP(o) {cerr<<#o<<" "<<o<<endl;}
#define DUMPC(o) {cerr<<#o; for(auto &e:(o))cerr<<" "<<e;cerr<<endl;}
#define INF 0x3f3f3f3f
#define INFL 0x3f3f3f3f3f3f3f3fLL
const int MOD = 1e9 + 7;

signed main() {
	while (true) {
		vector<int> l(10);
		int v1, v2;
		if (!(cin >> l[0]))break;
		char c;
		FOR(i, 1, 10)cin >> c >> l[i];
		cin >> c >> v1 >> c >> v2;
		int sum = accumulate(ALL(l), 0);
		double a = (double)sum*v1 / (v1 + v2);
		int temp = 0;
		FOR(i, 0, 10) {
			temp += l[i];
			if (temp >= a) {
				cout << i + 1 << endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <iostream>
#include <string>
#include <vector>
#include <algorithm>
#include <cmath>
#include <cstdio>
#include <functional>
#include <numeric>
#include <stack>
#include <queue>
#include <map>
#include <set>
#include <utility>
#include <sstream>
#include <complex>

using namespace std;

#define FOR(i,a,b) for(long long i=(a);i<(b);i++)
#define REP(i,N) for(long long i=0;i<(N);i++)
#define ALL(s) (s).begin(),(s).end()
#define fi first
#define se second

#define PI acos(-1.0)
#define INF 1000000007

typedef long long ll;
typedef pair<ll, ll> P;
typedef pair<double, double> PD;
typedef pair<string, ll> PS;
typedef vector<ll> V;

char k;
double d[10], v1, v2, t;

int main(){
	while (cin >> d[0]){
		double dis = d[0];
		REP(i, 9){
			cin >> k >> d[i + 1];
			dis += d[i + 1];
		}
		cin >> k >> v1 >> k >> v2;
		t = dis / (v1 + v2);
		dis = 0;
		REP(i, 10){
			dis += d[i];
			if (dis >= t*v1){
				cout << i + 1 << endl;
				break;
			}
		}
	}
}

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

using namespace std;

double a[10];
double v1, v2;

int main()
{
  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){
    for (int i = 1; i < 10; i++){
      a[i] += a[i - 1];
    }
    double v = v1 + v2;
    double t = a[9] / v;
    double c = t * v1;

    for (int i = 0; i < 8; i++){
      if (c <= a[i + 1]){
        cout << i + 2 << endl;
        break;
      }
    }
  }
}

C++: #include <stdio.h>

char buf[100];
int l[10], v[2];

int main() {
	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, v, v + 1) != -1) {
		int total = 0;
		int i;
		
		for (i = 0; i < 10; i++) total += l[i];
		
		int now = 0;
		for (i = 0; i < 10; i++) {
			now += l[i];
			if (now * v[1] >= (total - now) * v[0]) {
				break;
			}
		}
		printf("%d\n", i + 1);
	}
	return 0;
}

C++: #include<iostream>
#include<vector>
#include<algorithm>
#include<cstdio>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cmath>
#include<numeric>
#include<map>
#include<stack>
#include<queue>
#include<list>
using namespace std;
int inf = 1000000000;

int main(void) {

  vector<int> l(10);
  vector<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]) ){
    int sum = accumulate(l.begin(), l.end(), 0);
    // cerr << sum << " ";
    double tmp = sum * v[0] * 1.0 / (v[0]+v[1]);
    // cerr << tmp << endl;
    for(int i=1; i<10; i++) l[i] += l[i-1];
    // int a = 0;
    for(int i=1; i<10; i++){
      if( l[i-1] == tmp ){
        cout << i << endl;
        break;
      }else if( l[i-1] < tmp && tmp < l[i] ){
        // cerr << l[i-1] << " " << l[i] << endl;
        cout << i+1 << endl;
        // break;
      }
    }
  }



  return 0;
}

// EOF

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

using db = double;
using ll = long long;
using vi = vector <int>;
#define pb push_back

const int N = 13;
int l[N];

int main() {
	ios :: sync_with_stdio(0);

	while(cin >> l[1]) {
		char c;
		for(int i = 2; i <= 10; i ++)
			cin >> c >> l[i];
		int v1, v2; cin >> c >> v1 >> c >> v2;
		partial_sum(l, l + 11, l);
		for(int i = 1; i <= 10; i ++)
			if(l[i - 1] * (v1 + v2) < l[10] * v1 && l[10] * v1 <= l[i] * (v1 + v2))
				cout << i << '\n';
	}

	return 0;
}

C++: #include<stdio.h>

int main(void){

	int k[20]={0},i=0,traina=0,trainb=0,sum=0,dec=0,stoped;
	double t=0,x=0;					//x=trainaÌÚ®£AtÍÔ
	
	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&k[0],&k[1],&k[2],&k[3],&k[4],&k[5],&k[6],&k[7],&k[8],&k[9],&traina,&trainb) != EOF){
	
		//scanf("%d %d",&traina,&trainb);	//ñÔ¬x
		dec=0;
		sum=0;
		stoped=0;
		
		for(i=0;i<10;i++){				//SÌÌ·³
			sum=k[i]+sum;
		}
		
		dec=traina+trainb;		//l1=v1t;l2=v2t;l=l1+l2;l/(v1+v2)=t;l=v1t+v2t lÍÚ®£AtÍÔÂ©é¶©ñ
	
		t=(double)sum/dec;	//·êá¤Ô
		x=(double)traina*t;	//·êá¢Êu
		
		//printf("sum=%d dec=%d x=%f t=%f\n",sum,dec,x,t);														
		
		
		for(i=0;i<10;i++){														
			if(stoped>=x){
				break;
			}
			stoped=k[i]+stoped;
		}
			
		printf("%d\n",i);
	}
	return 0;
}

C++: #include <iostream>
#include <stdio.h>
using namespace std;
int main() {
  int b[10],k[10],i,v1,v2;
  double h;
  while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",&b[0],&b[1],&b[2],&b[3],&b[4],&b[5],&b[6],&b[7],&b[8],&b[9],&v1,&v2)!=EOF) {
    k[0]=b[0];
	for (i=1;i<10;i++) k[i]=k[i-1]+b[i];
	h=(double)k[9]*v1/(v1+v2);
	for (i=0;i<10;i++) if (h>=k[i]-b[i] && h<=k[i]) break;
	cout << i+1 << endl;
  }
  return 0;
  }

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

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

C++: #define _USE_MATH_DEFINES
#include<iostream>
#include<iomanip>
#include<algorithm>
#include<cctype>
#include<cmath>
#include<cstdio>
#include<deque>
#include<list>
#include<set>
#include<stack>
#include<string>
#include<sstream>
#include<map>
#include<queue>
#include<vector>
using namespace std;

int main() {
	for (bool f = true; f;) {
		char c;
		int l[11] = {}, v[2], L[11] = {};
		for (int i = 1; i <= 10; i++) {
			if (!(cin >> l[i] >> c))f = false;
			L[i] = L[i - 1] + l[i];
		}
		cin >> v[0] >> c >> v[1];

		double a = L[10] * (double)v[0] / (v[0] + v[1]);

		for (int i = 1; i <= 10; i++) {
			if (L[i] >= a) {
				cout << i << endl;
				break;
			}
		}
	}

	return 0;
}