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 <vector>
#include <cmath>
using namespace std;
typedef vector <int> vi;
#define EPS 1e-6
#define N 10

int main(void){
	int a, v1=0, v2=0;
	vi x(N);
	while (cin>>a){
		char c;
		x[0] = a;
		for (int i=1; i<N;i++){
			cin>>c>>a;
			x[i] = x[i-1]+a;
		}
		cin>>c>>v1>>c>>v2;

		double r=1.0*x[N-1]*v1/(v1+v2);
		for (int i=0; i<N; i++)
			if (r<x[i] || fabs(r-x[i])<EPS){
				cout<<i+1<<endl;
				break;
			}
	}
	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,ret;
	double sum=0;
	vector<int> l(10, 0);
	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) {
		for (int i=0; i<10; i++) {
			sum += l[i];
		}
		sum /= (v1+v2);
		sum *= v1;
		for (int i=0; i<10; i++) {
			sum -= l[i];
			if (sum <= 0) {
				ret = i+1;
				break;
			}
		}
		cout << ret << endl;
	}
	return 0;
}

C++: #include <cstdio>

int main()
{
        const int MAX = 10;
        int l[MAX];
        int v1, v2;
        int sumL;

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

        return 0;
}

C++: #include <iostream>
using namespace std;
int L[10], v1, v2, sum;
int main() {
  while (~scanf("%d", &L[0])) {
    sum = L[0];
    for (int i = 1; i < 10; i++) {
      scanf(",%d", &L[i]);
      sum += L[i];
    }
    scanf(",%d,%d", &v1, &v2);
    double p = (double)v1 * sum / (v1 + v2);
    double d = 0.0;
    for (int i = 0; i < 10; i++) {
      d += L[i];
      if (d >= p) {
        printf("%d\n", i + 1);
        break;
      }
    }
  }
}

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

int main(){
	int first;
	while(std::cin>>first){
		std::vector<int> distance(10);
		distance[0]=first;
		int a=0;
		int sum=0;
		char dummy;
		sum+=first;
		for(int i=1;i<10;++i){
			std::cin>>dummy;
			int s;
			std::cin>>s;
			sum+=s;
			a+=s;
			distance[i]=a;
		}
		int v1,v2;
		std::cin>>dummy>>v1>>dummy>>v2;
		int ans=0;
		for(int i=9;i>=0;--i){
			if(distance[i]<=sum/(v1+v2)*v1){
				ans=i+1;
			}
		}
		std::cout<<ans<<std::endl;
	}
	return 0;
}

C++: #include<iostream>

using namespace std;

int data[10];

int main(){
  while(cin >> data[0]){
    double sum = data[0];
    char trash;
    cin >> trash;
    for(int i = 1; i < 10; i++){
      cin >> data[i] >> trash;
      sum += data[i];
      data[i] = sum;
    }
    int v[2];
    cin >> v[0] >> trash >> v[1];
    v[1] += v[0];
    sum /= v[1];
    sum *= v[0];
    int max = 0;
    for(int i = 0; i < 10; i++){
      if(sum <= data[i]){
	max = i+1;
	break;
      }
    }
    cout << max << endl;
  }
  return 0;
}

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

int main(void)
{
	int l[10],v[2];char c;
	while(~std::scanf("%d%c",&l[0],&c))
	{
		int sum=0;
		for(int i=1; i<10; i++)
			std::scanf("%d%c",&l[i],&c);
		for(int i=0; i<2; i++)
			std::scanf("%d%c",&v[i],&c);
		for(int i=0; i<10; i++)
			sum += l[i];

		double meet = (double)v[0]*((double)sum/(v[0]+v[1]));
		int n;
		for(n=0, sum=0; sum < meet; n++)
			sum += l[n];
		std::cout << n << std::endl;
	}
	return 0;
}

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

int main() {
	double a[10];
	double b, c;
	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],&b,&c)+1) {
		int dis=0;
		for (int i = 0; i < 10; i++) {
			dis += a[i];
		}
		double speed = b + c;
		double x = dis / speed * b;
		int j = 0;
		while (1) {
			if (x - a[j] < 0) { break; }
			x -= a[j];
			j++;
		}
		cout << j + 1 << endl;
	}
	return 0;
}

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

#define N 10	// üHÌ

int main()
{
	double l[N], v[2];
	double sum[N];
	double time;
	double position;
	int i;

	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],&v[0],&v[1]) != EOF) {
		sum[0] = l[0];
		for (i = 1; i < N; i++)
			sum[i] = sum[i-1]+l[i];
		for (i = 0; i < N; i++)
			cout<<sum[i]<<",";
		time = (double)sum[9] / (double)(v[0]+v[1]);
		position = v[0] * sum[9] / (v[0]+v[1]);
		cout<<endl;
		for (i = 0; i < N; i++)
			if (sum[i]>=position)
				break;
		i++;

		cout<<i<<endl;
	}

	return 0;
}

C++: #include<iostream>
#include<cstdio>
using namespace std;
int main(){
  int l[10];
  int v1,v2;
  int sum;
  double coll;
  int station;
  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)+1){
    sum=0;
    for(int i=0;i<10;i++){
      sum+=l[i];
    }
    //  cout<<"sum="<<sum<<endl;
    coll=(double)(v1*sum)/(double)(v1+v2);
    //  cout<<coll<<endl;
    for(int i=0;i<10;i++){
      coll-=l[i];
      if(coll<=0){cout<<i+1<<endl;break;}
    }
  }
}

C++: #include <stdio.h>

int main(void) {
  int l[10];
  while(scanf("%d", &l[0]) != EOF) {
  int sum, v1, v2, vs, now = 0, i, j;
  sum = l[0];
  for(i = 1; i < 10; ++i) {
    scanf(",%d", &l[i]);
    sum += l[i];
  }
  scanf(",%d,%d", &v1, &v2);
  vs = v1 + v2;
  double t = (double)sum / (double)vs;
  //printf("sum%d vs%d t%f\n", sum, vs, t);
  for(i = 0; i <= 10; ++i) {
    if(now >= t * v1) {
      printf("%d\n", i);
      break;
    }
    now += l[i];
  }
  }
  return 0;
}

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

int main(){
	
	int b , n[12] , m[12] = {} , t[3] ;
	int sub ;
	char a ;
	
	while(1){
		cin >> b ;
		if( cin.eof() ) break ;
		
		n[0] = b ;
		m[0] = n[0] ;
		for( int i=1 ; i<10 ; i++ ){
			cin >> a >> n[i] ;
			m[i] = m[i-1] + n[i] ;
		}
		scanf("%c%d,%d",&a ,&t[0] ,&t[1] ) ;
		
		sub = min( t[0] , t[1] ) ;
		
		int x = 0 , y = m[9]*sub , p ;
		for( p=1 ; ; p++ ){
			x += t[0] ;
			y -= t[1] ;
			if( x/sub >= y/sub ){
				p = x ;
				break ;
			}
		}
		
		for( int i=1 ;  i<10 ; i++ ){
			if( m[i-1]*sub >= p ){
				cout << i << endl ;
				break ;
			}
		}
	}
	
return 0 ;
}