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<cstdio>

int main(void) {
	int l1, l2, l3, l4, l5, l6, l7, l8, l9, l10, v1, v2;
	int sum, num;
	double p;

	while(scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &l1, &l2, &l3, &l4, &l5, &l6, &l7, &l8, &l9, &l10, &v1, &v2) != EOF) {
		sum = l1 + l2 + l3 + l4 + l5 + l6 + l7 + l8 + l9 + l10;
		p = (double)sum * v1 / (v1 + v2);
		if(p <= l1) { num = 1; }
		else if(p <= l1 + l2) { num = 2; }
		else if(p <= l1 + l2 + l3) { num = 3; }
		else if(p <= l1 + l2 + l3 + l4) { num = 4; }
		else if(p <= l1 + l2 + l3 + l4 + l5) { num = 5; }
		else if(p <= l1 + l2 + l3 + l4 + l5 + l6) { num = 6; }
		else if(p <= l1 + l2 + l3 + l4 + l5 + l6 + l7) { num = 7; }
		else if(p <= l1 + l2 + l3 + l4 + l5 + l6 + l7 + l8) { num = 8; }
		else if(p <= l1 + l2 + l3 + l4 + l5 + l6 + l7 + l8 + l9) { num = 9; }
		else { num = 10; }
		printf("%d\n", num);
	}

	return 0;
}

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

int main() {
	int a[10];
	int b, c;
	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
		&a[0],&a[1],&a[2],&a[3],&a[4],&a[5],&a[6],
		&a[7],&a[8],&a[9],&b,&c)+1) {
		int dis=0;
		for (int i = 0; i < 10; i++) {
			dis += a[i];
		}
		int speed = b + c;
		int x = (dis + speed - 1) / speed;
		int j = 0;
		while (1) {
			if (x - a[j] < 0) { break; }
			x -= a[j];
			j++;
		}
		cout << j + 1 << endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <stdio.h>
using namespace std;
int main() {
  int b[10],k[10],i,v1,v2;
  vector<int> s;
  double h;
  while (cin >> b[0] >> b[1] >> b[2] >> b[3] >> b[4] >> b[5] >> b[6] >> b[7] >> b[8] >> b[9] >> v1 >> v2) {
    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;
	s.push_back(i+1);
  }
  for (i=0; i<s.size() ; i++) cout << s[i] << endl;
  return 0;
  }

C++: #include <iostream>
#include <string>
#include <string.h>
#include <vector>
using namespace std;

vector<string> split(const string &str, char delim){
  vector<string> res;
  size_t current = 0, found;
  while((found = str.find_first_of(delim, current)) != string::npos){
    res.push_back(string(str, current, found - current));
    current = found + 1;
  }
  res.push_back(string(str, current, str.size() - current));
  return res;
}

int main()
{
	string s;
	while(cin >> s)
	{
		vector<string> _s = split(s,',');
		int *values = new int[11];
		double *v = new double[2];

		for(int i=0;i<11;i++)
		{
			if(i == 0)
			{
				values[i] = 0;
			}
			else
			{
				values[i] = std::atoi(_s[i-1].c_str()) + values[i-1];
			}
			
		}

		for(int i=0;i<2;i++)
		{
			v[i] = std::atoi(_s[i+10].c_str());
		}
		double temp = v[0] / (v[0]+v[1]);
		temp *= values[10];

		bool flag = true;
		for(int i=0;i<10;i++)
		{
			if(values[i] <= temp && temp <= values[i+1] && flag)
			{
				cout << i+1 << endl;
				flag = false;
			}
		}
	}
	return 0;
}

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

int main() {
	int k[12], v1, v2, x;
	double h, d;

	while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d", &k[1], &k[2], &k[3],
			&k[4], &k[5], &k[6], &k[7], &k[8], &k[9], &k[10], &v1, &v2) != EOF) {
		x = 0;
		for (int i = 1; i <= 10; i++) {
			x += k[i];
		}
		h = (double) x / (v1 + v2);
		d = (double) v1 * h;
		x = 0;
		for (int i = 1; i <= 10; i++) {
			x += k[i];
			if (d <= x) {
				printf("%d\n", i);
				break;
			}
		}
	}
}

C++: #include <iostream>

using namespace std;

void solve()
{
	int l[10];
	while(cin >> l[0])
	{
		for(int i = 1; i <= 9; ++i)
		{
			scanf(",%d", &l[i]);
		}
		int v[2];
		scanf(",%d,%d", &v[0], &v[1]);
		int sum = 0;
		for(int i = 0; i < 10; ++i)
		{
			sum += l[i];
		}
		double time = (double)sum / (v[0] + v[1]);
		double dist = time * (double)v[0];
		int pos = 0;
		int d = 0;
		while(true)
		{
			d += l[pos];
			if(d >= dist)
			{
				cout << pos + 1 << endl;
				break;
			}
			++pos;
		}
	}
}

int main()
{
	solve();
	return(0);
}

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,sum,ret;
	vector<int> l(10, 0);
	for (int c=0; c<2000; c++) {
		scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d\n", &l[1],&l[2],&l[3],&l[4],&l[5],&l[6],&l[7],&l[8],&l[9],&l[10],&v1,&v2);
		sum = (l[1]+l[2]+l[3]+l[4]+l[5]+l[6]+l[7]+l[8]+l[9]+l[10])*(int)(v1/(v1+v2));
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}

C++: #include<cstdio>

int main(){
	int l[10],x,y,i;
	double par;
	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],&x,&y) != EOF ){
		par=0;
		for(i=0;i<10;i++){
			par+=l[i];
		}
		par = par*x/(x+y);
		for(i=0;par>0;i++){
			par-=l[i];
		}
		printf("%d\n",i);
	}
	return 0;
}

C++: #include<iostream>

#define loop(i,a,b) for(int i = a; i < b; i++)
#define rep(i,a) loop(i,0,a)
using namespace std;

int main(void){
	int l[10];
	int v[2];
	char tmp;
	double x;
	while(cin>>l[0]){
		cin>>tmp;
		loop(i,1,10)cin>>l[i]>>tmp;
		cin>>v[0]>>tmp>>v[1];
		
		int sum = 0;
		rep(i,10)sum+=l[i];
		
		x = sum * v[0]/(v[0] + v[1]);
		
		sum = 0;
		int cnt=0;
		rep(i,10){
			sum+=l[i];
			cnt++;
			if(sum>=x){
				cout<<cnt<<endl;
				break;
			}		
		}
	}

}

C++: #include <bits/stdc++.h>
using namespace std;
int main(){
  int l[10],v1,v2,len,point,now;
  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){
    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){
        printf("%d\n",i+1);
        break;
      }
    }
  }
  return 0;
}