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()
{
        const int MAX = 10;
        int l[MAX];
        int 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 sumL = 0;
                for (int i: l) {
                        sumL += i;
                }
                float t = (float)sumL / (v1 + v2);
                float l1 = v1 * t;
                int ans = 0;
                float len = 0.0;
                while (len < l1) {
                        len += l[ans++];
                }
                printf("%d\n", ans);
        }

        return 0;
}

C++: #include <iostream>
#include <vector>
#include <algorithm>

#define INPUT_FROM_FILE (0) 
#if INPUT_FROM_FILE
#include <fstream>
#endif


int main(int argc, char **argv){
	std::vector<int> l(10);
	char tmp;
	int v0, v1;

#if INPUT_FROM_FILE
	std::ifstream ifs("test.txt");
	//FILE *fp = fopen("test.txt", "r");
#endif

#if INPUT_FROM_FILE
	
	while(ifs >> l[0] >> tmp >> l[1] >> tmp >> l[2] >> tmp >>  l[3] >> tmp
		>> l[4] >> tmp >> l[5] >> tmp >> l[6] >> tmp >> l[7] >> tmp >> l[8] >> tmp 
		>> l[9] >> tmp >> v0 >> tmp >> v1){
#else
	while(std::cin >> l[0] >> tmp >> l[1] >> tmp >> l[2] >> tmp >>  l[3] >> tmp
		>> l[4] >> tmp >> l[5] >> tmp >> l[6] >> tmp >> l[7] >> tmp >> l[8] >> tmp 
		>> l[9] >> tmp >> v0 >> tmp >> v1){
#endif

		int sum = 0;
		for(int i = 0; i < l.size(); i++){
			sum += l[i];
		}

		double t = double(sum) / (v0 + v1);
		double p = v0 * t;

		for(int i = 0; i < 10; i++){
			p -= l[i];
			if(p <= 0){
				std::cout << i + 1 << std::endl;
				break;
			}
		}
	}
	return 0;
}

C++: #include <algorithm>
#include <vector>
#include <math.h>
#include <stdio.h>
#include <cctype>
#include <iostream>
#include <set>
#include <string>
#include <queue>
#include <map>
#include <utility>
using namespace std;
int size(string x){
	string::size_type size=x.size();
	return size;
}
#define fu(l,k) for(int i=l;i<k;i++)
#define fd(l,k) for(int i=l;i>k;i--)
#define sort(ss) sort(ss.begin(), ss.end())
#define rsort(ss) sort(ss.rbegin(), ss.rend())
typedef  vector<string> vs;
typedef  vector<int> vi;
double pi(){
	return M_PI;
}
typedef set<int> set_i;
typedef set<string> set_s;
int INF=1000000;
int main(){
	double l[11]={},ll=0,lb;
	double v1,v2,ans;
	double m;
	char a;
	while(cin>>l[0]>>a>>l[1]>>a>>l[2]>>a>>l[3]>>a>>l[4]>>a>>l[5]>>a>>
		l[6]>>a>>l[7]>>a>>l[8]>>a>>l[9]>>a>>v1>>a>>v2){
		ll=0;
		for(int i=0;i<10;i++){
			ll+=l[i];
		}
		m=ll/(v1+v2);
		lb=0;
		for(int i=0;i<10;i++){
			lb+=l[i];
			if(m*v1<=lb){
				ans=i+1;
				break;
			}
		}
		cout<<(int)ans<<endl;
	}
}

C++: #include <iostream>
#include <vector>
#include <string>
#include <sstream>

std::vector<std::string> split(std::string &str, char delim) {
	std::vector<std::string> result;
	std::istringstream is(str);
	std::string buf;
	while (getline(is, buf, delim)) {
		result.push_back(buf);
	}
	return result;
}

bool inputDataSet(std::vector<int> *l, int *v1, int *v2) {
	std::string line;
	if (!getline(std::cin, line)) { return false; }
	std::vector<std::string> tokens = split(line, ',');
	if (tokens.size() != 12) { return false; }
	for (int i = 0; i < 10; ++i) {
		std::istringstream is(tokens[i]);
		if (!(is >> (*l)[i])) { return false; }
	}
	std::istringstream is1(tokens[10]), is2(tokens[11]);
	if (!((is1 >> *v1) && (is2 >> *v2))) { return false; }
	return true;
}

template <class Iterator>
int sum(Iterator first, Iterator last) {
	int sum = 0;
	for (; first != last; ++first) { sum += *first; }
	return sum;
}

int main() {
	std::vector<int> l(10);
	int v1, v2;
	while (inputDataSet(&l, &v1, &v2)) {
		const int x1 = 0, x2 = sum(l.begin(), l.end());
		v2 = -v2;
		if (v1 == v2) { continue; }	// ツ堕環妥篠堕ャツ度 0 ツづ按づァツ古ーツ債キツつオツづ按つ「
		const int x = x1 + -(x1 - x2) * v1 / (v1 - v2);
		int n = 0, sum = 0;
		for (std::vector<int>::iterator it = l.begin(); it != l.end() && sum < x; ++it) {
			sum += *it;
			++n;
		}
		if (x == sum) { ++n; }
		std::cout << n << std::endl;
	}
	return 0;
}

C++: #include <iostream>
#include <vector>
#include <queue>
#include <stack>
#include <map>
#include <set>
#include <cmath>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <string>
#include <algorithm>
#include <climits>
#include <utility>

#define PRINT(STR) cout << STR << endl;
#define REP(i, n) for (int (i) = 0; (i) < (int)(n); (i)++)
#define REG(i, a, b) for (int (i) = ((int)(a)); (i) < ((int)(b)); i++)
#define ALL(V) (V).begin(), (V).end()
#define SPACE " "

typedef long long ll;

using namespace std;

int nextInt() { int n = -1; cin >> n; return n; }
double nextDouble() { double d = -1; cin >> d; return d; }
ll nextll() { ll n = -1; cin >> n; return n; }
string nextString() { string str; cin >> str; return str; }

int INF = 1LL << 25;
double EPS = 1e-9;
int numofbits(int bits)
{
    bits = (bits & 0x55555555) + (bits >> 1 & 0x55555555);
    bits = (bits & 0x33333333) + (bits >> 2 & 0x33333333);
    bits = (bits & 0x0f0f0f0f) + (bits >> 4 & 0x0f0f0f0f);
    bits = (bits & 0x00ff00ff) + (bits >> 8 & 0x00ff00ff);
    return (bits & 0x0000ffff) + (bits >>16 & 0x0000ffff);
}

// BEGIN //////////////////////////////////////////////////////////////
int main() {
    int ls[10];
    int v1,v2;
    while (scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%d",
      ls, ls+1, ls+2, ls+3, ls+4, ls+5, ls+6, ls+7, ls+8, ls+9, &v1, &v2) != EOF) {
        int l_sum = 0;
        REP(i, 10) {
          l_sum += ls[i];
        }
        double l = (double)v1 * l_sum / (v1 + v2);
        REP(i, 10) {
          l -= ls[i];
          if (l <= 0) {
            PRINT(i + 1);
            break;
          }
        }
    }

	return 0;
}
// END   //////////////////////////////////////////////////////////////

C++: #include<cstdio>

using namespace std;

int main(void){
	int ku[11],i,ans=0;
	float v1,v2,zen=0,hit;

	while((scanf("%d,%d,%d,%d,%d,%d,%d,%d,%d,%d,%f,%f",&ku[1],&ku[2],&ku[3],&ku[4],&ku[5],&ku[6],&ku[7],&ku[8],&ku[9],&ku[10],&v1,&v2))!=EOF){
			for(i=1;i<10;i++)	zen+=ku[i];
			hit=zen/(v1+v2)*v1;
			for(i=1;i<10;i++){
				ans+=ku[i];
				if(ans>=hit){
					printf("%d\n",i);
					break;
				}
			}
			zen=0;
			ans=0;
	}

	return 0;
}

C++: #include<iostream>
#include<vector>
#include<stdio.h>
int main(){
	int v1,v2;
	std::vector<int> vec(10);
	while(1){
		float sum=0;
		for(int i=0;i<10;i++){
			scanf("%d,",&vec[i]);
			//std::cin>>vec[i];
			sum+=vec[i];
		}
		scanf("%d,%d",&v1,&v2);
		//std::cin>>v1>>v2;
		if(std::cin.eof())break;
		float time=sum/(v1+v2);
		float a=v1*time;
		int b=0;
		while(a>0){
			a-=vec[b];
			b++;
		}
		std::cout<<b<<std::endl;
	}
	return 0;
}

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

int main(){
	int a = 0,v1,v2;
	int cnt = 0;
	char b;
	vector<int> data;
	while(~scanf("%d%c",&a,&b)){
		if(b == ','){
			cnt++;
			if(cnt == 11){
				v1 = a;
			}else{
				for(int i=0;i<a;i++){
					data.push_back(cnt);
				}
			}
		}else{
			v2 = a;
			v1 = ceil( v1 * (double)data.size() / (v1+v2) );
			cout << data[v1-1] << endl;
			cnt = 0;
			data.clear();
		}
	} 
}